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 <simon.bra.ag@gmail.com>
  • Loading branch information
SimonBrandner committed Aug 11, 2021
1 parent ee0eda7 commit 1f98ea4
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 1f98ea4

Please sign in to comment.