You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Daemon loses messages that arrive while it is stopped #15
If a chat gets new messages while the daemon is stopped, the first live message after a restart makes them a permanent gap in the cache.
Why:
The live handler moves the chat's forward cursor to the newest message ID (updateForwardCursor in src/daemon/handlers.ts).
Live updates start before the job scheduler (connectAccount in src/daemon/daemon-accounts.ts), so a live message usually lands before the catch-up job runs.
A forward catch-up fetches only the newest 100 messages above the cursor and then moves the cursor to the top (src/daemon/sync-worker-real-jobs.ts).
mtcute's catchUp option is not enabled, so missed updates aren't replayed on start.
Example: a chat gets 150 messages while the daemon is off. After the restart, one new message arrives, and those 150 are never fetched.
Fix: keep the live cursor separate from the catch-up cursor (or catch up before starting updates), page the catch-up until it reaches the cursor, and consider updates: { catchUp: true }.
Done when a test with a 150-message gap shows every message cached after a restart.
Activity
fix(daemon): keep messages that arrive while the daemon is stopped
fix(daemon): keep messages that arrive while the daemon is stopped
docs(roadmap): drop #15, fixed