handle app mention events for workspaces that don't deliver message.channels - #12193
Closed
yunyunyunyun-yun wants to merge 1 commit into
Closed
handle app mention events for workspaces that don't deliver message.channels#12193yunyunyunyun-yun wants to merge 1 commit into
yunyunyunyun-yun wants to merge 1 commit into
Conversation
Collaborator
|
Already fixed on current main via PR #18198, which changed the handler from to forwarding to with ts-based dedup. Thanks for reporting this! |
Collaborator
|
Already fixed on current main via PR #18198, which changed the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes a silent message-handling failure where the Slack gateway completely ignores @mention messages on Enterprise Grid workspaces.
When a user @mentions the bot in a channel, Slack delivers an app_mention event. The previous code registered handle_app_mention as an intentional no-op, assuming Slack would also deliver a duplicate message event that the existing handle_message_event handler would catch. However, some workspaces (notably Enterprise Grid installs) only deliver app_mention and do not send a corresponding message.channels event — causing all @mentions to be silently dropped with no response, no reaction, and no log output.
The fix forwards app_mention events to the existing _handle_slack_message handler. The timestamp-based deduplicator already present in _handle_slack_message prevents double-processing in workspaces that do deliver both events.
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
To verify deduplication works correctly on workspaces that deliver both events: confirm the bot does not reply twice when both app_mention and message.channels events arrive.
Checklist
Code
Documentation & Housekeeping
Screenshots / Logs
Before fix — app_mention routed to no-op, bot stays silent:
DEBUG slack_bolt.AsyncApp: Checking listener: handle_message_event ...
DEBUG slack_bolt.AsyncApp: Checking listener: handle_app_mention ...
DEBUG slack_bolt.AsyncApp: Running listener: handle_app_mention ...
DEBUG slack_bolt.AsyncApp: Responding with status: 200 body: ""
← bot silent, no reaction, no response
After fix
app_mention forwarded to _handle_slack_message, bot responds normally.