#6089: fix(slack): add reactionNotifications config check to reactions handler
channel: slack
size: XS
Cluster:
Slack Integration Enhancements
## Problem
The Slack reactions handler (`src/slack/monitor/events/reactions.ts`) processes all reactions unconditionally, ignoring the `reactionNotifications` config setting. Even with `channels.slack.reactionNotifications: "own"` configured, reaction events are not filtered appropriately.
## Root Cause
Unlike Telegram's implementation (`src/telegram/bot.ts:379-382`), the Slack handler doesn't check `ctx.reactionMode` before processing reactions.
**Telegram (working):**
```typescript
const reactionMode = telegramCfg.reactionNotifications ?? "own";
if (reactionMode === "off") return;
if (user?.is_bot) return;
if (reactionMode === "own" && !wasSentByBot(chatId, messageId)) return;
```
**Slack (before this fix):**
```typescript
const handleReactionEvent = async (event: SlackReactionEvent, action: string) => {
// ... just processes everything without checking reactionMode
```
## Solution
Added `reactionNotifications` config filtering at the start of `handleReactionEvent`:
- Check `reactionMode` config (off/own/all/allowlist)
- Skip bot's own reactions (consistent with other providers)
- For `own` mode, only process reactions on messages sent by the bot
- For `allowlist` mode, only process reactions from allowlisted users
## Testing
- [x] Verified `ctx.reactionMode`, `ctx.reactionAllowlist`, and `ctx.botUserId` are available on `SlackMonitorContext`
- [x] TypeScript compiles without errors (`npx tsc --noEmit`)
- [x] Lint passes for changed file (`pnpm lint -- src/slack/monitor/events/reactions.ts`)
- [ ] Runtime testing pending (would appreciate maintainer testing on live Slack instance)
Supersedes #2638
---
## AI Disclosure 🤖
- [x] **AI-assisted:** This PR was developed with Claude (via OpenClaw)
- [x] **Testing level:** Lightly tested (type-check + lint; no live Slack testing)
- [x] **I understand what this code does:** Yes - adds early-return guards matching Telegram's reaction filtering pattern
**Context:** Discovered this gap while configuring my own OpenClaw Slack integration. The fix mirrors the existing Telegram implementation pattern.
Most Similar PRs
#9520: fix: ignore slack already_reacted
by bolismauro · 2026-02-05
78.5%
#19816: feat(slack): add typingReaction config for DM typing indicator fall...
by dalefrieswthat · 2026-02-18
77.8%
#19105: fix(slack): suppress system events for bot's own reactions
by Clawborn · 2026-02-17
77.0%
#23192: fix(slack): remove ack reaction on NO_REPLY when removeAckAfterRepl...
by SidQin-cyber · 2026-02-22
75.4%
#17316: fix: ack reaction not removed when block streaming is enabled (Tele...
by czmathew · 2026-02-15
73.4%
#23320: fix(slack): respect replyToMode when incomingThreadTs is auto-created
by dorukardahan · 2026-02-22
73.2%
#17879: fix: prevent Slack auth errors from crashing the entire gateway
by zuyan9 · 2026-02-16
73.2%
#20479: fix(slack): keep replies flowing for oversized file uploads
by olyashok · 2026-02-19
72.7%
#2414: fix(slack): route DM replies to original channel, not App Home
by mbennett37 · 2026-01-26
72.2%
#20406: fix(slack): respect replyToMode when computing statusThreadTs in DMs
by QuinnYates · 2026-02-18
71.5%