Fix add existing to space dialog no longer showing rooms for public spaces
This commit is contained in:
parent
06726d38fe
commit
4411498057
1 changed files with 9 additions and 3 deletions
|
@ -68,9 +68,15 @@ const AddExistingToSpaceDialog: React.FC<IProps> = ({ matrixClient: cli, space,
|
||||||
if (room !== space && room !== selectedSpace && !existingSubspacesSet.has(room)) {
|
if (room !== space && room !== selectedSpace && !existingSubspacesSet.has(room)) {
|
||||||
arr[0].push(room);
|
arr[0].push(room);
|
||||||
}
|
}
|
||||||
} else if (!existingRoomsSet.has(room) && joinRule !== "public") {
|
} else if (!existingRoomsSet.has(room)) {
|
||||||
// Only show DMs for non-public spaces as they make very little sense in spaces other than "Just Me" ones.
|
if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) {
|
||||||
arr[DMRoomMap.shared().getUserIdForRoomId(room.roomId) ? 2 : 1].push(room);
|
// Only show DMs for non-public spaces as they make very little sense in spaces other than "Just Me" ones.
|
||||||
|
if (joinRule !== "public") {
|
||||||
|
arr[2].push(room);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
arr[1].push(room);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}, [[], [], []]);
|
}, [[], [], []]);
|
||||||
|
|
Loading…
Reference in a new issue