diff --git a/src/client/state/Notifications.js b/src/client/state/Notifications.js index 13dd3e1..09fa240 100644 --- a/src/client/state/Notifications.js +++ b/src/client/state/Notifications.js @@ -234,7 +234,7 @@ class Notifications extends EventEmitter { const actions = this.matrixClient.getPushActionsForEvent(mEvent); if (!actions?.notify) return; - if (navigation.selectedRoomId === room.roomId && document.visibilityState === 'visible') return; + if (navigation.selectedRoomId === room.roomId && document.hasFocus()) return; if (mEvent.isEncrypted()) { await mEvent.attemptDecryption(this.matrixClient.crypto);