Can check if rooms are muted
This commit is contained in:
@@ -11,6 +11,7 @@ export interface Room {
|
||||
is_space?: boolean;
|
||||
parents: string[];
|
||||
number_unread_messages: number;
|
||||
notifications: "AllMessages" | "MentionsAndKeywordsOnly" | "Mute";
|
||||
latest_event?: MatrixEvent;
|
||||
}
|
||||
|
||||
|
||||
@@ -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]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user