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

Commit

Permalink
Fix people space notification state not updating for new DM invites
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed May 10, 2023
1 parent 7b6ff1a commit 4ae0903
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stores/spaces/SpaceStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {

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

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

0 comments on commit 4ae0903

Please sign in to comment.