Timed room mute silently overwrites a manual notification-mode change made during the mute window #21

Closed
opened 2026-09-12 01:50:54 -04:00 by jared · 0 comments
Owner

Severity: high · Type: bug · Confidence: high

Location: src/app/features/room-nav/RoomNavItem.tsx:299-316 (unmuteRoom, scheduleMuteTimer), src/app/pages/client/ClientNonUIFeatures.tsx:299-328 (MuteTimerRestore)

Problem

unmuteRoom(mx, roomId) unconditionally calls setRoomNotificationPreference(mx, roomId, RoomNotificationMode.Unset, RoomNotificationMode.Mute) when a timed mute expires — it never re-checks whether the room's notification mode is still Mute at that point. If the user manually changes the notification mode (e.g. to "All messages" via the bell icon/RoomNotificationModeSwitcher) while a timed mute is still pending (either in the same tab, another tab, or after a reload where MuteTimerRestore re-arms the stale timer from localStorage), the previously scheduled timer still fires later and silently reverts their explicit choice back to Unset, with no toast or indication of what happened.

How to trigger

Mute a room for 15 minutes. Before the 15 minutes elapse, manually switch the room's notification mode to "All messages" via the notification switcher. Wait past the original mute duration — the mode silently reverts to default/unset.

Suggested fix

Before restoring, check the room's current notification mode and only reset it if it is still RoomNotificationMode.Mute (compare against live state, not the closed-over prevMode); otherwise just drop the stale timer entry.


Filed from the September 2026 client audit (branch lotus @ 4bea4895).

**Severity:** high · **Type:** bug · **Confidence:** high **Location:** `src/app/features/room-nav/RoomNavItem.tsx:299-316` (`unmuteRoom`, `scheduleMuteTimer`), `src/app/pages/client/ClientNonUIFeatures.tsx:299-328` (`MuteTimerRestore`) ### Problem `unmuteRoom(mx, roomId)` unconditionally calls `setRoomNotificationPreference(mx, roomId, RoomNotificationMode.Unset, RoomNotificationMode.Mute)` when a timed mute expires — it never re-checks whether the room's notification mode is still `Mute` at that point. If the user manually changes the notification mode (e.g. to "All messages" via the bell icon/`RoomNotificationModeSwitcher`) while a timed mute is still pending (either in the same tab, another tab, or after a reload where `MuteTimerRestore` re-arms the stale timer from `localStorage`), the previously scheduled timer still fires later and silently reverts their explicit choice back to `Unset`, with no toast or indication of what happened. ### How to trigger Mute a room for 15 minutes. Before the 15 minutes elapse, manually switch the room's notification mode to "All messages" via the notification switcher. Wait past the original mute duration — the mode silently reverts to default/unset. ### Suggested fix Before restoring, check the room's *current* notification mode and only reset it if it is still `RoomNotificationMode.Mute` (compare against live state, not the closed-over `prevMode`); otherwise just drop the stale timer entry. --- --- _Filed from the September 2026 client audit (branch `lotus` @ 4bea4895)._
jared added this to the Audit 2026-09 · High milestone 2026-09-12 01:50:54 -04:00
jared added the bugpriority: higharea: navigation labels 2026-09-12 01:50:54 -04:00
jared self-assigned this 2026-09-12 01:50:54 -04:00
jared closed this issue 2026-09-12 02:14:51 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
2026-10-14
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#21