Skip to content

fix: Fix repeated message corrections in MUCs#2180

Merged
jubalh merged 2 commits into
masterfrom
fix/lmc
Jun 21, 2026
Merged

fix: Fix repeated message corrections in MUCs#2180
jubalh merged 2 commits into
masterfrom
fix/lmc

Conversation

@jubalh

@jubalh jubalh commented Jun 18, 2026

Copy link
Copy Markdown
Member

Avoid overwriting the stored last message ID in MUCs when an outgoing message is a correction.

In 1:1 chats, we prevent overwriting the stored last_msg_id when sending a correction.
In MUCs, last_msg_id was unconditionally overwritten with the ID of the correction message itself.

XEP-0308:
"If a message is corrected multiple times, every subsequent correction must reference the ID of the original message, not the ID of the previous correction."

Avoid overwriting the stored last message ID in MUCs
when an outgoing message is a correction.

In 1:1 chats, we prevent overwriting the stored last_msg_id when sending
a correction.
In MUCs, last_msg_id was unconditionally overwritten with the ID of the
correction message itself.

XEP-0308:
"If a message is corrected multiple times, every subsequent correction
must reference the ID of the original message, not the ID of the
previous correction."

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh added this to the next milestone Jun 18, 2026
@jubalh jubalh self-assigned this Jun 18, 2026
Change behavior to update the stored "last message" buffer with the
corrected text.

Previously, the buffer purposely preserved the original message text,
causing subsequent corrections to autocomplete back to the original
message. With this change, subsequent corrections will autocomplete to
and edit the most recently corrected text instead.

This was requested by users in the MUC. And seems to be what other
clients do as well.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh merged commit 8251ca2 into master Jun 21, 2026
12 checks passed
@jubalh jubalh deleted the fix/lmc branch June 21, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant