fix(slack): exempt app_mention from dedup to prevent race condition (#34833)

This commit is contained in:
OpenClaw Agent
2026-03-04 11:53:16 -08:00
parent 2123265c09
commit 52c53cfa21

View File

@@ -165,7 +165,10 @@ export function createSlackMessageHandler(params: {
) {
return;
}
if (ctx.markMessageSeen(message.channel, message.ts)) {
// Exempt app_mention from dedup check to avoid race condition with message event
// (Slack delivers both events with no guaranteed order; whichever arrives first
// would mark the message as seen and drop the second event)
if (opts.source !== "app_mention" && ctx.markMessageSeen(message.channel, message.ts)) {
return;
}
trackEvent?.();