Skip to content

Ignore missing chats in last message updates#573

Open
benthamite wants to merge 1 commit into
zevlg:masterfrom
benthamite:fix/ignore-missing-chat-last-message
Open

Ignore missing chats in last message updates#573
benthamite wants to merge 1 commit into
zevlg:masterfrom
benthamite:fix/ignore-missing-chat-last-message

Conversation

@benthamite
Copy link
Copy Markdown
Contributor

Summary

  • Avoid asserting when updateChatLastMessage references a chat that is not present in the local cache.
  • Skip the update in that case instead of trying to mutate and mark a nil chat.

Rationale

TDLib can emit chat update events for chats that are not currently known locally. In that case telega-chat-get with the offline flag returns nil, and the existing cl-assert aborts update processing. Treating the missing chat as a no-op keeps the event handler robust while preserving the existing behavior for cached chats.

@zevlg
Copy link
Copy Markdown
Owner

zevlg commented May 11, 2026

No. This assert is correct. If chat is not present in the cache it means telega, TDLib or you local custom code has error. Please collect TDLib logs before you get this assertion and send them privately to me @zevlg in the Telegram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants