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

Commit

Permalink
Use ignoreSelfEvent
Browse files Browse the repository at this point in the history
Signed-off-by: Šimon Brandner <[email protected]>
  • Loading branch information
SimonBrandner committed Aug 11, 2021
1 parent 83f223f commit 70c1080
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export const sortRooms = (rooms: Room[]): Room[] => {
const ev = r.timeline[i];
if (!ev.getTs()) continue; // skip events that don't have timestamps (tests only?)

if (ev.getSender() === myUserId || Unread.eventTriggersUnreadCount(ev)) {
if (
(ev.getSender() === myUserId && !ignoreSelfEvent(ev)) ||
Unread.eventTriggersUnreadCount(ev)
) {
return ev.getTs();
}
}
Expand Down

0 comments on commit 70c1080

Please sign in to comment.