fix: handle incoming edit messages from other users - #518
Merged
Conversation
ContentBody::EditMessage was not matched in on_message(), causing edits from other users to fall through to the catch-all and be silently dropped. Only sync edits (from our own devices) were handled. Add a match arm that extracts the target timestamp and new body from the EditMessage, resolves the channel (group or direct), and applies the edit via the existing store_edited_message() storage method.
cwedgwood
force-pushed
the
cw/fix-incoming-edits
branch
from
April 3, 2026 05:37
97d9930 to
2b94e11
Compare
Owner
|
Thank you for fixing this! |
boxdot
enabled auto-merge (squash)
April 10, 2026 06:10
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.
Edits from other users arrive as top-level
ContentBody::EditMessagebuton_message()had no match arm for this variant. They fell through to thecatch-all and were silently logged as "skipping unhandled message."
Edits from our own devices worked because they arrive as
SyncMessage.sent.edit_message, which was already handled inhandle_sync_message().This adds a match arm for
ContentBody::EditMessagethat resolves thechannel (group or direct), and applies the edit via the existing
store_edited_message()storage method.Tested manually: incoming edits in group chats and direct messages from
other users now update the message body and display
[edited].