From 74dc76e22e5709bef399c0acb6054840ae08d830 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:10:21 +0530 Subject: [PATCH] fix room opens at home after leave rejoin (#1848) --- src/app/state/room/roomToParents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/state/room/roomToParents.ts b/src/app/state/room/roomToParents.ts index b58190cd..f66662ff 100644 --- a/src/app/state/room/roomToParents.ts +++ b/src/app/state/room/roomToParents.ts @@ -83,7 +83,7 @@ export const useBindRoomToParentsAtom = ( }; const handleMembershipChange = (room: Room, membership: string) => { - if (room.getMyMembership() === Membership.Leave) { + if (isSpace(room) && room.getMyMembership() === Membership.Leave) { setRoomToParents({ type: 'DELETE', roomId: room.roomId }); return; }