fix(telegram): add message deduplication to prevent duplicate processing#598
Closed
youbiak wants to merge 1 commit into
Closed
fix(telegram): add message deduplication to prevent duplicate processing#598youbiak wants to merge 1 commit into
youbiak wants to merge 1 commit into
Conversation
Telegram messages can be redelivered after gateway restarts, getUpdates conflicts, or network reconnects. This causes the same message to be processed multiple times, spamming sessions with duplicates. Add seenMessages map (matching the pattern used in Slack adapter) to track chatId:messageId pairs and skip already-processed messages. - Track up to 500 recent messages - Auto-cleanup entries older than 60 seconds - Log skipped duplicates in verbose mode
heatherstew44-maker
pushed a commit
to heatherstew44-maker/openclaw
that referenced
this pull request
Mar 8, 2026
guillaumemaka
pushed a commit
to guillaumemaka/openclaw
that referenced
this pull request
May 28, 2026
…ams (openclaw#598) `rawSearch` is already the output of `parseDiffRouteSearch` via the `useSearch` select transform. The `useMemo` at line 760 re-parsed it through the same function with an unsafe `as Record<string, unknown>` cast, producing an identical result. Use `rawSearch` directly instead.
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.
Problem
Telegram messages can be redelivered after gateway restarts, getUpdates conflicts, or network reconnects. This causes the same message to be processed multiple times, spamming sessions with duplicates.
Evidence: A single "Hello" message (ID 1687) was delivered 10+ times to a session over 25 minutes.
Solution
Add
seenMessagesmap (matching the pattern already used in Slack adapter - seesrc/slack/monitor.ts:501-512) to trackchatId:messageIdpairs and skip already-processed messages.Changes:
Testing
npm run lint)AI Disclosure
Closes #597