Can check if rooms are muted

This commit is contained in:
2025-12-01 09:12:58 +01:00
parent 7acb0cbafa
commit 57797e933a
3 changed files with 39 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ export interface Room {
is_space?: boolean;
parents: string[];
number_unread_messages: number;
notifications: "AllMessages" | "MentionsAndKeywordsOnly" | "Mute";
latest_event?: MatrixEvent;
}

View File

@@ -72,7 +72,10 @@ function _MainMessageWidget(p: {
}, [space, p.rooms]);
const unreadRooms = React.useMemo(
() => p.rooms.filter((r) => r.number_unread_messages > 0).length,
() =>
p.rooms.filter(
(r) => r.number_unread_messages > 0 && r.notifications === "AllMessages"
).length,
[p.rooms]
);