Merge pull request #3129 from pangeachat/3126-when-an-activity-is-created-in-the-space-details-page-only-chats-within-that-space-should-be-shown-to-launch

chore: if space is selected, only show chats within that space in act…
This commit is contained in:
ggurdin 2025-06-18 10:28:17 -04:00 committed by GitHub
commit 0500163f15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,6 +69,13 @@ class ActivityRoomSelectionState extends State<ActivityRoomSelection> {
return a.name.toLowerCase().compareTo(b.name.toLowerCase());
});
final room = widget.controller.room;
if (room != null && room.isSpace) {
_launchableRooms = _launchableRooms.where((r) {
return room.spaceChildren.any((child) => child.roomId == r.id);
}).toList();
}
_hasBotDM = Matrix.of(context).client.rooms.any((room) {
if (room.isDirectChat &&
room.directChatMatrixID == BotName.byEnvironment) {