mirror of
https://gitgud.io/jcmoon/sockchat-rs.git
synced 2026-10-18 17:24:11 -04:00
Switching back to a room you had already visited appeared to do nothing,
while the status bar updated. The server was innocent: probing /join
shows it behaves exactly as intended --
/join 1 -> {"1": 42}
/join 20 -> {"1": 1, "20": 41}
/join 1 again -> {"1": 44}
each join replaying that room's history. The bug was that the client
displayed every message it received regardless of room, and deduplicates
by message ID. So the replayed history for a room you had already seen
was discarded as duplicates, nothing new was appended, and the view kept
showing the room you came from. The first switch seemed to work only
because those messages were genuinely new.
Messages now carry room_id and are filtered to the open room. Whispers
and client status lines have no room and stay visible everywhere.
room_id had been removed early on as unused wire data. It is not: it is
the only thing that makes a room switch observable.
Co-Authored-By: Claude Fable 5 <[email protected]>