fix room opens at home after leave rejoin

This commit is contained in:
Ajay Bura 2024-07-28 08:35:15 +05:30
parent 44161c4157
commit 596f7ec66e

View file

@ -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;
}