From 171fc2cdc5bdca2539299313cd9640fdf50788ba Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Wed, 6 Nov 2024 17:41:03 +0100 Subject: [PATCH] update sdk --- ElementX.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- ElementX/Sources/Services/Client/ClientProxy.swift | 4 +++- ElementX/Sources/Services/Client/ClientProxyProtocol.swift | 1 + project.yml | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 0c81278f56..3184afc21c 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -7858,7 +7858,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 1.0.63; + version = 1.0.64; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index eff2b29b05..b336c80344 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -149,8 +149,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "0dcb3a3ee8b0b1bb92c2e9d6395202e2547fe0d8", - "version" : "1.0.63" + "revision" : "5b2a50a75fe5814e5be4c550717d0e8a1abdbc7b", + "version" : "1.0.64" } }, { diff --git a/ElementX/Sources/Services/Client/ClientProxy.swift b/ElementX/Sources/Services/Client/ClientProxy.swift index 58acb6c317..801ce4e8cb 100644 --- a/ElementX/Sources/Services/Client/ClientProxy.swift +++ b/ElementX/Sources/Services/Client/ClientProxy.swift @@ -625,7 +625,9 @@ class ClientProxy: ClientProxyProtocol { func resolveRoomAlias(_ alias: String) async -> Result { do { - let resolvedAlias = try await client.resolveRoomAlias(roomAlias: alias) + guard let resolvedAlias = try await client.resolveRoomAlias(roomAlias: alias) else { + return .failure(.failedResolvingRoomAlias) + } // Resolving aliases is done through the directory/room API which returns too many / all known // vias, which in turn results in invalid join requests. Trim them to something manageable diff --git a/ElementX/Sources/Services/Client/ClientProxyProtocol.swift b/ElementX/Sources/Services/Client/ClientProxyProtocol.swift index 5a28fb6a63..85bd4f7adf 100644 --- a/ElementX/Sources/Services/Client/ClientProxyProtocol.swift +++ b/ElementX/Sources/Services/Client/ClientProxyProtocol.swift @@ -36,6 +36,7 @@ enum ClientProxyError: Error { case failedUploadingMedia(Error, MatrixErrorCode) case roomPreviewIsPrivate case failedRetrievingUserIdentity + case failedResolvingRoomAlias } enum SlidingSyncConstants { diff --git a/project.yml b/project.yml index 1126076d92..b7ee5742e4 100644 --- a/project.yml +++ b/project.yml @@ -60,7 +60,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 1.0.63 + exactVersion: 1.0.64 # path: ../matrix-rust-sdk Compound: url: https://github.com/element-hq/compound-ios