-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Telegram update offset should be scoped to bot token #11337
Copy link
Copy link
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Problem
The update offset file (~/.openclaw/telegram/update-offset-default.json) is keyed to the account name (e.g. "default"), not the bot token. If the bot token changes (common during initial setup/debugging), the persisted lastUpdateId from the old token becomes invalid for the new token's update_id sequence.
This causes shouldSkipUpdate() to silently reject ALL inbound messages because updateId <= lastUpdateId is always true — the old offset is millions ahead of the new bot's actual update IDs.
Impact
- All inbound Telegram messages silently dropped
- No error logged — just a dedupe skip
- Very hard to diagnose (raw-update logs show messages arriving, but nothing happens)
Suggested Fix
Include the bot user ID (or a hash of the token) in the offset file:
{
"version": 2,
"botId": "8125167982",
"lastUpdateId": 363897059
}On startup, if botId doesn't match the current bot, reset lastUpdateId to null.
Related
Root cause of #11011
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.