Commit 87b3742
fix(slack): bypass mention gate for app_mention events
When requireMention is true, the mention gate checks message text for
bot mentions. However, Slack delivers both `message` and `app_mention`
events for @mentions, with no guaranteed order. When the `message`
event arrives first and is processed (or deduped), the subsequent
`app_mention` event can be incorrectly dropped by the mention gate
even though Slack has confirmed the bot was explicitly mentioned.
This fix skips the mention gate when opts.source is "app_mention",
since Slack's app_mention event is only delivered to the mentioned
bot's app — the mention is already confirmed at the platform level.
The existing dedup + retry mechanism (rememberAppMentionRetryKey /
consumeAppMentionRetryKey) addresses part of this issue but doesn't
cover the case where the mention gate itself blocks the app_mention
event after it passes dedup.
Fixes #34833
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 3814f95 commit 87b3742
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
491 | 497 | | |
492 | 498 | | |
493 | 499 | | |
| |||
0 commit comments