Fix public room showing leaved room as joined
This commit is contained in:
parent
bc856269ff
commit
3372fb6f74
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ function PublicRooms({ isOpen, searchTerm, onRequestClose }) {
|
||||||
return rooms.map((room) => {
|
return rooms.map((room) => {
|
||||||
const alias = typeof room.canonical_alias === 'string' ? room.canonical_alias : room.room_id;
|
const alias = typeof room.canonical_alias === 'string' ? room.canonical_alias : room.room_id;
|
||||||
const name = typeof room.name === 'string' ? room.name : alias;
|
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 (
|
return (
|
||||||
<RoomTile
|
<RoomTile
|
||||||
key={room.room_id}
|
key={room.room_id}
|
||||||
|
|
Loading…
Reference in a new issue