mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-03 12:49:30 +00:00
64e1ca5398
Leaving a room does not clear the notification counts the server last sent for it, and nothing on our side clears them either, so a room sitting in the historical list kept a badge that could never be got rid of: there is no way to read a room you are not in. The unread state of such a room is now nothing at all. Our own member event is what decides it rather than getMyMembership(), which answers "leave" both for a room we have left and for one we have not heard about yet — blanking a badge that is merely late would be a worse bug than the one being fixed here. It goes below the invite and knock checks, which are leaves of a sort and have their own answers, so a pending invite and a refused knock still show what they showed before. Tests: a left room with a count of 42 now reports nothing. Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>