Fix muted room notification visible in space
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
5be4287230
commit
23f57e4d75
1 changed files with 6 additions and 0 deletions
|
@ -215,6 +215,7 @@ class Notifications extends EventEmitter {
|
|||
this.matrixClient.on('Room.timeline', (mEvent, room) => {
|
||||
if (room.isSpaceRoom()) return;
|
||||
if (!isNotifEvent(mEvent)) return;
|
||||
|
||||
const liveEvents = room.getLiveTimeline().getEvents();
|
||||
|
||||
const lastTimelineEvent = liveEvents[liveEvents.length - 1];
|
||||
|
@ -224,6 +225,11 @@ class Notifications extends EventEmitter {
|
|||
const total = room.getUnreadNotificationCount('total');
|
||||
const highlight = room.getUnreadNotificationCount('highlight');
|
||||
|
||||
if (this.getNotiType(room.roomId) === cons.notifs.MUTE) {
|
||||
this.deleteNoti(room.roomId, total ?? 0, highlight ?? 0);
|
||||
return;
|
||||
}
|
||||
|
||||
this._setNoti(room.roomId, total ?? 0, highlight ?? 0);
|
||||
|
||||
if (this.matrixClient.getSyncState() === 'SYNCING') {
|
||||
|
|
Loading…
Reference in a new issue