From 1ad5317d6e60b53b08fddb120a37deb1a72dac5c Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Sun, 13 Mar 2022 16:40:26 +0530 Subject: [PATCH] Ignore space notification Signed-off-by: Ajay Bura --- src/client/state/Notifications.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/state/Notifications.js b/src/client/state/Notifications.js index edb29ee..1f7be3e 100644 --- a/src/client/state/Notifications.js +++ b/src/client/state/Notifications.js @@ -193,6 +193,7 @@ class Notifications extends EventEmitter { _listenEvents() { this.matrixClient.on('Room.timeline', (mEvent, room) => { + if (room.isSpaceRoom()) return; if (!isNotifEvent(mEvent)) return; const liveEvents = room.getLiveTimeline().getEvents(); @@ -212,6 +213,7 @@ class Notifications extends EventEmitter { this.matrixClient.on('Room.receipt', (mEvent, room) => { if (mEvent.getType() === 'm.receipt') { + if (room.isSpaceRoom()) return; const content = mEvent.getContent(); const readedEventId = Object.keys(content)[0]; const readerUserId = Object.keys(content[readedEventId]['m.read'])[0];