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

Commit 4ae0903

Browse files
committed
Fix people space notification state not updating for new DM invites
1 parent 7b6ff1a commit 4ae0903

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stores/spaces/SpaceStore.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
765765

766766
const hiddenChildren = new EnhancedMap<string, Set<string>>();
767767
visibleRooms.forEach((room) => {
768-
if (room.getMyMembership() !== "join") return;
768+
if (!["join", "invite"].includes(room.getMyMembership())) return;
769769
this.getParents(room.roomId).forEach((parent) => {
770770
hiddenChildren.getOrCreate(parent.roomId, new Set()).add(room.roomId);
771771
});
@@ -872,6 +872,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
872872
}
873873

874874
const notificationStatesToUpdate = [...changeSet];
875+
// We update the People metaspace even if we didn't detect any changes
876+
// as roomIdsBySpace does not pre-calculate it so we have to assume it could have changed
875877
if (
876878
this.enabledMetaSpaces.includes(MetaSpace.People) &&
877879
userDiff.added.length + userDiff.removed.length + usersChanged.length > 0

0 commit comments

Comments
 (0)