fix: Emit IncomingMsgBunch on receipt of large message w/o pre-message (#8232)#8273
Draft
iequidoo wants to merge 2 commits into
Draft
fix: Emit IncomingMsgBunch on receipt of large message w/o pre-message (#8232)#8273iequidoo wants to merge 2 commits into
iequidoo wants to merge 2 commits into
Conversation
…age w/o pre-message If a pre-message is lost or delayed, or doesn't exist at all, download_msg() adds a new message instead of replacing an existing one. chat::mark_old_messages_as_noticed() must be called in this case.
#8232) If a pre-message is lost or delayed, or doesn't exist at all, download_msg() adds a new message instead of replacing an existing one. For simplicity, move emitting IncomingMsgBunch to Session::fetch_many_msgs() so that this event is emitted also in the mentioned case, it's not a problem if it's emitted when a pre-message was downloaded before. Co-authored-by: WofWca <wofwca@protonmail.com>
40f5f99 to
18673f8
Compare
iequidoo
commented
May 25, 2026
| { | ||
| let _fetch_msgs_lock_guard = context.fetch_msgs_mutex.lock().await; | ||
| self.fetch_many_msgs(context, folder, vec![uid], &uid_message_ids, sender) | ||
| Box::pin(self.fetch_many_msgs(context, folder, vec![uid], &uid_message_ids, sender)) |
Collaborator
Author
There was a problem hiding this comment.
clippy complained about a large future
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.
If a pre-message is lost or delayed, or doesn't exist at all,
download_msg()adds a new messageinstead of replacing an existing one. For simplicity, move emitting
IncomingMsgBunchtoSession::fetch_many_msgs()so that this event is emitted also in the mentioned case, it's not aproblem if it's emitted when a pre-message was downloaded before.
Another commit adds a missing call of
chat::mark_old_messages_as_noticed()in this case.Fix #8232
Replacement for #8259
No tests yet, going to add JSON-RPC Python tests on unencrypted messages, haven't found any such tests.