mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Use our own JoinRule type which doesn't include the reserved .private case. (#5056)
* Stop using Rust's JoinRule.private in mocks. It isn't used anywhere else (see MSC4413 for more context). * Use our own JoinRule (and AllowRule) types. * Update ElementX/Sources/Services/Room/JoinRule.swift Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com> --------- Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
@@ -80,7 +80,7 @@ extension RoomPreviewProxyMock {
|
||||
roomType: configuration.roomType,
|
||||
isHistoryWorldReadable: nil,
|
||||
membership: configuration.membership,
|
||||
joinRule: configuration.joinRule,
|
||||
joinRule: configuration.joinRule.rustValue,
|
||||
isDirect: configuration.isDirect,
|
||||
heroes: nil))
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ extension [LeaveSpaceRoom] {
|
||||
name: "Sound",
|
||||
isSpace: false,
|
||||
memberCount: 20,
|
||||
joinRule: .private),
|
||||
joinRule: .invite),
|
||||
isLastOwner: false,
|
||||
areCreatorsPrivileged: false),
|
||||
LeaveSpaceRoom(spaceRoom: SpaceRoom(id: "3",
|
||||
@@ -70,7 +70,7 @@ extension [LeaveSpaceRoom] {
|
||||
name: "The Theatre",
|
||||
isSpace: true,
|
||||
memberCount: 100,
|
||||
joinRule: .private,
|
||||
joinRule: .invite,
|
||||
childrenCount: 20),
|
||||
isLastOwner: false,
|
||||
areCreatorsPrivileged: false),
|
||||
@@ -78,7 +78,7 @@ extension [LeaveSpaceRoom] {
|
||||
name: "Bookings",
|
||||
isSpace: false,
|
||||
memberCount: 200,
|
||||
joinRule: .private,
|
||||
joinRule: .invite,
|
||||
childrenCount: 0),
|
||||
isLastOwner: true,
|
||||
areCreatorsPrivileged: false),
|
||||
@@ -160,7 +160,7 @@ private extension SpaceRoom {
|
||||
avatarUrl: avatarURL?.absoluteString,
|
||||
roomType: isSpace ? .space : .room,
|
||||
numJoinedMembers: memberCount,
|
||||
joinRule: joinRule,
|
||||
joinRule: joinRule?.rustValue,
|
||||
worldReadable: true,
|
||||
guestCanJoin: false,
|
||||
isDirect: isDirect,
|
||||
|
||||
Reference in New Issue
Block a user