Skip to content
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

Merged
merged 2 commits into from
Jul 29, 2020
Merged

Conversation

MeredithAnya
Copy link
Member

Not too long ago a PR was merged that added the option slack.legacy-app. This allows Sentry instances with that option set to False 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.

@@ -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 = (
Copy link
Member Author

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

@vercel vercel bot temporarily deployed to Preview July 28, 2020 17:27 Inactive
@@ -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:
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Contributor

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.

@MeredithAnya MeredithAnya merged commit a18e1cc into master Jul 29, 2020
@MeredithAnya MeredithAnya deleted the slack/ISSUE-921 branch July 29, 2020 14:21
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants