Make sure we pass the via parameters with all the routes.

Put the event ID first.

Fix tests.

Bump the SDK.
This commit is contained in:
Doug
2024-05-09 12:25:54 +01:00
committed by Stefan Ceriu
parent 52b6c25bd8
commit 1e0a6d76ae
23 changed files with 293 additions and 199 deletions
@@ -350,9 +350,9 @@ class ClientProxy: ClientProxyProtocol {
}
}
func joinRoom(_ roomID: String) async -> Result<Void, ClientProxyError> {
func joinRoom(_ roomID: String, via: [String]) async -> Result<Void, ClientProxyError> {
do {
let _ = try await client.joinRoomById(roomId: roomID)
let _ = try await client.joinRoomByIdOrAlias(roomIdOrAlias: roomID, serverNames: via)
// Wait for the room to appear in the room lists to avoid issues downstream
let _ = await waitForRoomSummary(with: .success(roomID), name: nil, timeout: 30)
@@ -569,7 +569,7 @@ class ClientProxy: ClientProxyProtocol {
RoomDirectorySearchProxy(roomDirectorySearch: client.roomDirectorySearch())
}
func resolveRoomAlias(_ alias: String) async -> String? {
func resolveRoomAlias(_ alias: String) async -> ResolvedRoomAlias? {
do {
return try await client.resolveRoomAlias(roomAlias: alias)
} catch {
@@ -678,7 +678,6 @@ class ClientProxy: ClientProxyProtocol {
.syncService()
.withCrossProcessLock(appIdentifier: "MainApp")
.withUtdHook(delegate: ClientDecryptionErrorDelegate(actionsSubject: actionsSubject))
.withUnifiedInvitesInRoomList(withUnifiedInvites: true)
.finish()
let roomListService = syncService.roomListService()
@@ -129,7 +129,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
func createRoom(name: String, topic: String?, isRoomPrivate: Bool, userIDs: [String], avatarURL: URL?) async -> Result<String, ClientProxyError>
func joinRoom(_ roomID: String) async -> Result<Void, ClientProxyError>
func joinRoom(_ roomID: String, via: [String]) async -> Result<Void, ClientProxyError>
func uploadMedia(_ media: MediaInfo) async -> Result<String, ClientProxyError>
@@ -159,7 +159,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
func roomDirectorySearchProxy() -> RoomDirectorySearchProxyProtocol
func resolveRoomAlias(_ alias: String) async -> String?
func resolveRoomAlias(_ alias: String) async -> ResolvedRoomAlias?
// MARK: - Ignored users