Add support for joining rooms from a space. (#4501)

* Add support for joining rooms from a space.

Doesn't yet handle the Join button 🤔

* Handle the join button for both rooms and spaces.

Also refactor more instances of spaceRoom to spaceRoomProxy.
This commit is contained in:
Doug
2025-09-11 16:41:19 +01:00
committed by GitHub
parent 880f2060f4
commit c2ac60f1e6
30 changed files with 304 additions and 34 deletions
@@ -96,4 +96,18 @@ extension RoomPreviewProxyMock {
underlyingOwnMembershipDetails = roomMembershipDetails
}
convenience init(spaceRoomProxy: SpaceRoomProxyProtocol) {
self.init(Configuration(roomID: spaceRoomProxy.id,
canonicalAlias: spaceRoomProxy.canonicalAlias ?? "",
name: spaceRoomProxy.name ?? "",
topic: spaceRoomProxy.topic ?? "",
avatarURL: spaceRoomProxy.avatarURL?.absoluteString ?? "",
numJoinedMembers: UInt64(spaceRoomProxy.joinedMembersCount),
numActiveMembers: UInt64(spaceRoomProxy.joinedMembersCount),
roomType: spaceRoomProxy.isSpace ? .space : .room,
membership: nil,
joinRule: spaceRoomProxy.joinRule ?? .restricted(rules: []),
isDirect: false))
}
}