Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix spurious notifications on non-live events #11133

Merged
merged 7 commits into from
Jun 27, 2023
3 changes: 2 additions & 1 deletion src/Notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ 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;

Expand Down