Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
onEventMessagesChanged
: handle msgId == 0
This cause the message list to be empty when the chat gets opened, and not update on some events. Reproduction steps are roughly as follows: 1. Create two accounts 2. On Alice, send ~20 messages to Bob. 3. Switch to Bob's account and open the chat with Alice. Do not scroll to bottom. 4. Switch to Alice account and send another message to Bob. 5. Switch to Bob's account and open the chat with Alice. You will see the `Failed to load message Msg#0 for account` error in the console and the chat will be empty. The bug was introduced in 7a968b6 (#4529). The added `messageId > C.DC_MSG_ID_LAST_SPECIAL` in the first `if` is purely for consistency and performance. It's the second one that matters.
- Loading branch information