From: Ajay Bura Date: Sun, 13 Mar 2022 11:10:26 +0000 (+0530) Subject: Ignore space notification X-Git-Tag: v1.8.1~18 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=1ad5317d6e60b53b08fddb120a37deb1a72dac5c;p=cinny.git Ignore space notification Signed-off-by: Ajay Bura --- 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];