Skip to content

fix: handle incoming edit messages from other users - #518

Merged
boxdot merged 1 commit into
boxdot:mainfrom
cwedgwood:cw/fix-incoming-edits
Apr 10, 2026
Merged

fix: handle incoming edit messages from other users#518
boxdot merged 1 commit into
boxdot:mainfrom
cwedgwood:cw/fix-incoming-edits

Conversation

@cwedgwood

Copy link
Copy Markdown
Contributor

Edits from other users arrive as top-level ContentBody::EditMessage but
on_message() had no match arm for this variant. They fell through to the
catch-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 in
handle_sync_message().

This adds a match arm for ContentBody::EditMessage that resolves the
channel (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].

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.
@boxdot

boxdot commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Thank you for fixing this!

@boxdot
boxdot enabled auto-merge (squash) April 10, 2026 06:10
@boxdot
boxdot merged commit 7e3d57e into boxdot:main Apr 10, 2026
9 checks passed
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