-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(slack): Use conversations.list for bot apps #20047
Conversation
@@ -423,7 +422,13 @@ def get_channel_id_with_timeout(integration, name, timeout): | |||
# Look for channel ID | |||
payload = dict(token_payload, **{"exclude_archived": False, "exclude_members": True}) | |||
|
|||
if options.get("slack.legacy-app") is True: | |||
default_install_type = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scefali going to update to use what you have in your PR
c94f793
to
1c13651
Compare
@@ -423,7 +429,9 @@ def get_channel_id_with_timeout(integration, name, timeout): | |||
# Look for channel ID | |||
payload = dict(token_payload, **{"exclude_archived": False, "exclude_members": True}) | |||
|
|||
if options.get("slack.legacy-app") is True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MeredithAnya You can remove all instances of this setting since this is the only use case of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heck I guess that means removing the docs on it too? Thinking about it again, is there any case that this check wouldn't pass for sentry on-prem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MeredithAnya I wouldn't remove it from the docs yet because you'll need it if you have the last version. It doesn't hurt to set it even if we don't use it (we can remove it in the future at some point). This check should work fine for on-prem.
Not too long ago a PR was merged that added the option
slack.legacy-app
. This allows Sentry instances with that option set toFalse
to be able to utilize the conversations.list endpoint for Slack.Sentry.io however, must have this option set to
True
because there are still users that have workspace apps enable and in use. We cannot use the conversations endpoints with the workspace apps because the workspace token is incompatible.Instead, we can look at the integration
metadata
to tell us whether or not an integration is a workspace app in order to determine which set of endpoints to use.