fix: Don't make message OutDelivered after successful resending to new broadcast member#8280
Merged
iequidoo merged 1 commit intoMay 29, 2026
Conversation
link2xt
approved these changes
May 28, 2026
| update_msg_state(context, self, MessageState::OutDelivered).await?; | ||
| /// Returns whether the message state is updated to `OutDelivered`. | ||
| pub(crate) async fn set_delivered(self, context: &Context) -> Result<bool> { | ||
| if context |
Collaborator
There was a problem hiding this comment.
Maybe add some comment that we are only updating from OutPending to avoid setting state for messages that are resent silently, which are currently broadcast messages.
For reference, corresponding broadcast logic that avoids setting OutPending (no need to reference it in the comment, it will get outdated easily, just for other reviewers):
Lines 4708 to 4712 in c26b6a0
Collaborator
Author
There was a problem hiding this comment.
Added a comment that OutPending means that the message is (re-)sent to all chat members. Maybe there will be other cases when messages are only re-sent to a subset of chat members, so decided not to mention broadcasts.
…w broadcast member Follow-up to 970222f. We shouldn't update the message state to `OutDelivered` if message sending failed before and the message was re-sent successfully only to a new broadcast member.
a4b8968 to
32c927d
Compare
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.
Follow-up to 970222f. We shouldn't update the message state to
OutDeliveredif message sending failed before and the message was re-sent successfully only to a new broadcast member.Replacement for #8155