You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
dont assume a user has joined all the rooms in a community
This commit is contained in:
@@ -180,7 +180,10 @@ class TagOrderStore extends Store {
|
|||||||
const client = MatrixClientPeg.get();
|
const client = MatrixClientPeg.get();
|
||||||
const changedBadges = {};
|
const changedBadges = {};
|
||||||
groupIds.forEach(groupId => {
|
groupIds.forEach(groupId => {
|
||||||
const rooms = GroupStore.getGroupRooms(groupId).map(r => client.getRoom(r.roomId));
|
const rooms =
|
||||||
|
GroupStore.getGroupRooms(groupId)
|
||||||
|
.map(r => client.getRoom(r.roomId)) // to Room objects
|
||||||
|
.filter(r => !!r); // filter out rooms we haven't joined from the group
|
||||||
const badge = rooms && RoomNotifs.aggregateNotificationCount(rooms);
|
const badge = rooms && RoomNotifs.aggregateNotificationCount(rooms);
|
||||||
changedBadges[groupId] = (badge && badge.count !== 0) ? badge : undefined;
|
changedBadges[groupId] = (badge && badge.count !== 0) ? badge : undefined;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user