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

Commit

Permalink
fix LL test; review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Dec 1, 2022
1 parent 4ca5699 commit 434ca89
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const Notifier = {
removed: boolean,
data: IRoomTimelineData,
) {
if (!data.liveEvent) return; // on notify for new things, not old.
if (!data.liveEvent) return; // only notify for new things, not old.
if (!this.isSyncing) return; // don't alert for any messages initially
if (ev.getSender() === MatrixClientPeg.get().getUserId()) return;

Expand Down Expand Up @@ -437,6 +437,11 @@ export const Notifier = {
}
}
const room = MatrixClientPeg.get().getRoom(roomId);

This comment has been minimized.

Copy link
@t3chguy

t3chguy Dec 1, 2022

Member

It looks like the room is only used for its room ID? Do we actually need the room object?

if (!room) {
// e.g we are in the process of joining a room.
// Seen in the cypress lazy-loading test.
return;
}

const actions = MatrixClientPeg.get().getPushActionsForEvent(ev);

Expand Down

0 comments on commit 434ca89

Please sign in to comment.