Severity
LOW (multi-account, same-group edge case — a missed notification, not a leak)
Summary
handleNotificationUpdate is a client-wide listener that fires for every local account. Its "don't notify me about the chat I'm already looking at" suppression checks only selectedChat?.id == update.groupIdHex (plus visibility) and never checks that update.accountIdHex belongs to the currently active account. selectedChat is always the active account's selection, while update can target any local identity. MLS group ids are globally unique, so if two of the user's local identities are both members of the same group, they share a groupIdHex.
Location / Evidence
whitenoise-mac/Core/WorkspaceState+Notifications.swift:48-50
if selectedChat?.id == update.groupIdHex, selectedConversationIsVisible() {
return // no check that update.accountIdHex == active account
}
Contrast: the settings-sync block just above (:37-44) does gate on the active account via ownsNotificationSettingsOperation(...); the suppression does not.
Failure scenario
- User has identities A and B, both members of group G (same
groupIdHex).
- User is viewing G under account A (
selectedChat.id == G, visible).
- A message arrives addressed to B in G.
handleNotificationUpdate for B evaluates selectedChat?.id == update.groupIdHex → true, conversation visible → the notification for B is suppressed.
- The user is not actually reading B's copy of the conversation and receives no alert for B's message.
Why this is not a duplicate
Suggested fix
Gate the suppression on the active account as well:
if activeAccount?.accountIdHex == update.accountIdHex,
selectedChat?.id == update.groupIdHex,
selectedConversationIsVisible() {
return
}
Found during a full-codebase review.
Severity
LOW (multi-account, same-group edge case — a missed notification, not a leak)
Summary
handleNotificationUpdateis a client-wide listener that fires for every local account. Its "don't notify me about the chat I'm already looking at" suppression checks onlyselectedChat?.id == update.groupIdHex(plus visibility) and never checks thatupdate.accountIdHexbelongs to the currently active account.selectedChatis always the active account's selection, whileupdatecan target any local identity. MLS group ids are globally unique, so if two of the user's local identities are both members of the same group, they share agroupIdHex.Location / Evidence
whitenoise-mac/Core/WorkspaceState+Notifications.swift:48-50Contrast: the settings-sync block just above (
:37-44) does gate on the active account viaownsNotificationSettingsOperation(...); the suppression does not.Failure scenario
groupIdHex).selectedChat.id == G, visible).handleNotificationUpdatefor B evaluatesselectedChat?.id == update.groupIdHex→ true, conversation visible → the notification for B is suppressed.Why this is not a duplicate
Suggested fix
Gate the suppression on the active account as well:
Found during a full-codebase review.