mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user