Skip to content

Fix your own sent messages sometimes showing twice in a room - #1376

Merged
kevinaboos merged 1 commit into
mainfrom
claude/duplicate-messages-private-rooms-4xetqd
Nov 13, 2026
Merged

kevinaboos merged 1 commit into
mainfrom
claude/duplicate-messages-private-rooms-4xetqd

Conversation

@kevinaboos

@kevinaboos kevinaboos commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

A user reported that in a private room, every message they sent showed up twice for them, while the other side saw it once and the log showed only one send.

This was a Matrix SDK bug that's already been fixed upstream, now we cherry pick those 3 fixes and point Robrix at that fixed sdk.

Update our matrix-sdk fork to pick up three upstream fixes for bugs that
could put a timeline's internal list of the room's events out of step
with the event cache's list.

When you send a message, the SDK's send queue puts a copy of it into the
event cache as soon as the server accepts it. When sync then delivers the
real event, the event cache replaces that copy and tells the timeline to
remove it by its index. If the timeline's list had drifted, that removal
hit a different event, so your message stayed twice and the event before
it could disappear from the timeline.

The fixes:
* Building a timeline could add an event twice if it reached the event
  cache while the timeline was being built. Robrix builds a room's
  timeline as soon as the room appears, e.g., right after joining it,
  which is when that room's events are still arriving.
* Clearing a timeline while one of your messages was still being sent
  kept the events that have no item of their own, like reactions.
* An event with no type made the event cache remove the wrong event when
  replacing a duplicate.
@kevinaboos
kevinaboos merged commit 87385e1 into main Nov 13, 2026
12 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.

1 participant