Update SDK to 26.04.23 (#5478)

updated sdk, and added error management on the send LLS API
This commit is contained in:
Mauro
2026-04-24 13:07:16 +02:00
committed by GitHub
parent a9fae7b4e7
commit 5d1132c75b
9 changed files with 773 additions and 39 deletions
@@ -755,7 +755,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
// MARK: - Live Location
func makeLiveLocationService() async -> RoomLiveLocationServiceProtocol {
await RoomLiveLocationService(liveLocationShares: room.liveLocationShares())
await RoomLiveLocationService(liveLocationsObserver: room.liveLocationsObserver())
}
func startLiveLocationShare(duration: Duration) async -> Result<Void, RoomProxyError> {
@@ -772,6 +772,16 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
do {
try await room.sendLiveLocation(geoUri: geoURI.string)
return .success(())
} catch let error as LiveLocationError {
switch error {
case .Network:
MXLog.error("Failed sending live location with error: \(error)")
return .failure(.sdkError(error))
// We can consider the session not active for any error other the Network one.
default:
MXLog.error("Failed sending live location, session is not active")
return .failure(.liveLocationSessionIsNotActive)
}
} catch {
MXLog.error("Failed sending live location with error: \(error)")
return .failure(.sdkError(error))
@@ -20,6 +20,7 @@ enum RoomProxyError: Error {
case missingTransactionID
case failedCreatingPinnedTimeline
case timelineError(TimelineProxyError)
case liveLocationSessionIsNotActive
}
/// An enum that describes the relationship between the current user and the room, and contains a reference to the specific implementation of the `RoomProxy`.