From 3372fb6f746a8a58598965fcfc3bbefe1b9d28e3 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 4 May 2022 14:54:43 +0530 Subject: [PATCH] Fix public room showing leaved room as joined --- src/app/organisms/public-rooms/PublicRooms.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/organisms/public-rooms/PublicRooms.jsx b/src/app/organisms/public-rooms/PublicRooms.jsx index 467f38d..d1674c3 100644 --- a/src/app/organisms/public-rooms/PublicRooms.jsx +++ b/src/app/organisms/public-rooms/PublicRooms.jsx @@ -195,7 +195,7 @@ function PublicRooms({ isOpen, searchTerm, onRequestClose }) { return rooms.map((room) => { const alias = typeof room.canonical_alias === 'string' ? room.canonical_alias : room.room_id; const name = typeof room.name === 'string' ? room.name : alias; - const isJoined = initMatrix.matrixClient.getRoom(room.room_id) !== null; + const isJoined = initMatrix.matrixClient.getRoom(room.room_id)?.getMyMembership() === 'join'; return (