Ignore space notification
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
7cf5df80ce
commit
1ad5317d6e
1 changed files with 2 additions and 0 deletions
|
@ -193,6 +193,7 @@ class Notifications extends EventEmitter {
|
||||||
|
|
||||||
_listenEvents() {
|
_listenEvents() {
|
||||||
this.matrixClient.on('Room.timeline', (mEvent, room) => {
|
this.matrixClient.on('Room.timeline', (mEvent, room) => {
|
||||||
|
if (room.isSpaceRoom()) return;
|
||||||
if (!isNotifEvent(mEvent)) return;
|
if (!isNotifEvent(mEvent)) return;
|
||||||
const liveEvents = room.getLiveTimeline().getEvents();
|
const liveEvents = room.getLiveTimeline().getEvents();
|
||||||
|
|
||||||
|
@ -212,6 +213,7 @@ class Notifications extends EventEmitter {
|
||||||
|
|
||||||
this.matrixClient.on('Room.receipt', (mEvent, room) => {
|
this.matrixClient.on('Room.receipt', (mEvent, room) => {
|
||||||
if (mEvent.getType() === 'm.receipt') {
|
if (mEvent.getType() === 'm.receipt') {
|
||||||
|
if (room.isSpaceRoom()) return;
|
||||||
const content = mEvent.getContent();
|
const content = mEvent.getContent();
|
||||||
const readedEventId = Object.keys(content)[0];
|
const readedEventId = Object.keys(content)[0];
|
||||||
const readerUserId = Object.keys(content[readedEventId]['m.read'])[0];
|
const readerUserId = Object.keys(content[readedEventId]['m.read'])[0];
|
||||||
|
|
Loading…
Reference in a new issue