Commit 42e6b3c
committed
fix(feishu): add early event-level dedup to prevent duplicate message processing
Feishu webhook retries and WebSocket reconnect replays can deliver the
same event multiple times. The existing messageId dedup in
handleFeishuMessage runs downstream after the debouncer, so two
concurrent dispatches of the same event can both enter the pipeline
before either records the messageId.
Add a synchronous in-memory dedup check at the EventDispatcher handler
level using message_id as key with a 5-minute TTL. This catches
duplicates immediately when they arrive, before they enter the
inbound debouncer or processing queue.
The downstream persistent dedup in bot.ts is preserved for
cross-restart protection.
Closes #374771 parent ee6f7b1 commit 42e6b3c
1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
379 | 386 | | |
380 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
381 | 397 | | |
382 | | - | |
383 | 398 | | |
384 | 399 | | |
385 | 400 | | |
| |||
0 commit comments