Ignore space notification
authorAjay Bura <ajbura@gmail.com>
Sun, 13 Mar 2022 11:10:26 +0000 (16:40 +0530)
committerAjay Bura <ajbura@gmail.com>
Sun, 13 Mar 2022 11:10:26 +0000 (16:40 +0530)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
src/client/state/Notifications.js

index edb29ee92ec2823d3e65216e707428c498dd1fd7..1f7be3e5c418e2ff3fee04a3f1fc5008b74c1047 100644 (file)
@@ -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];