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

Don't send ephemeral message unless app is in channel #922

Closed
dennissivia opened this issue Aug 23, 2019 · 0 comments · Fixed by #923
Closed

Don't send ephemeral message unless app is in channel #922

dennissivia opened this issue Aug 23, 2019 · 0 comments · Fixed by #923
Assignees
Labels
type:bug A user-facing issue

Comments

@dennissivia
Copy link
Contributor

dennissivia commented Aug 23, 2019

When trying to send an (ephemeral) message to slack and the app is not installed on that channel, slack responds with a no_permissionerror.
In order to avoid this error and by extension reduce the noise in our exception tracking, we should skip payloads with is_app_in_channel: False.

Example sentry error payload:

{
  api_app_id: [Filtered], 
  authed_teams: [
    [Filtered]
  ], 
  event: {
    channel: [Filtered], 
    is_app_in_channel: False, 
    links: [{}], 
    [...]
    type: link_shared, 
    [...]
  },
  type: event_callback
}

Error response:

{
  code: slackclient_platform_error, 
  data: {
    error: no_permission, 
    ok: False
  }
}
@dennissivia dennissivia added the type:bug A user-facing issue label Aug 23, 2019
@dennissivia dennissivia self-assigned this Aug 23, 2019
dennissivia added a commit that referenced this issue Aug 23, 2019
While processing the `link_shared` Slack event, we need to check if the
integration is installed in the current channel before creating an
ephemeral message for private repos.
Otherwise the attempt to prompt the user will result in a `no_permission` error from Slack.

Closes #922
@dennissivia dennissivia changed the title Don't send ephemeral message without installed app Don't send ephemeral message unless app is in channel Aug 23, 2019
dennissivia pushed a commit that referenced this issue Aug 26, 2019
While processing the `link_shared` Slack event, we need to check if the
integration is installed in the current channel before creating an
ephemeral message for private repos.
Otherwise the attempt to prompt the user will result in a `no_permission` error from Slack.

Closes #922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A user-facing issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant