Fix spurious notifications on non-live events (#11133)
* Fix notifier not discriminating removed and backpaginated events * Ignore events on the thread list generated timelines * Add test * tsc strict
This commit is contained in:
parent
f73fc496e2
commit
5cf818fefa
2 changed files with 27 additions and 1 deletions
|
@ -412,9 +412,11 @@ class NotifierClass {
|
|||
removed: boolean,
|
||||
data: IRoomTimelineData,
|
||||
): void => {
|
||||
if (!data.liveEvent) return; // only notify for new things, not old.
|
||||
if (removed) return; // only notify for new events, not removed ones
|
||||
if (!data.liveEvent || !!toStartOfTimeline) return; // only notify for new things, not old.
|
||||
if (!this.isSyncing) return; // don't alert for any messages initially
|
||||
if (ev.getSender() === MatrixClientPeg.safeGet().getUserId()) return;
|
||||
if (data.timeline.getTimelineSet().threadListType !== null) return; // Ignore events on the thread list generated timelines
|
||||
|
||||
MatrixClientPeg.safeGet().decryptEventIfNeeded(ev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue