mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
only stop the session when receiving a not live error
This commit is contained in:
@@ -772,16 +772,9 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
|||||||
do {
|
do {
|
||||||
try await room.sendLiveLocation(geoUri: geoURI.string)
|
try await room.sendLiveLocation(geoUri: geoURI.string)
|
||||||
return .success(())
|
return .success(())
|
||||||
} catch let error as LiveLocationError {
|
} catch LiveLocationError.NotLive {
|
||||||
switch error {
|
MXLog.error("Failed sending live location, session is not active")
|
||||||
case .Network:
|
return .failure(.liveLocationSessionIsNotActive)
|
||||||
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 {
|
} catch {
|
||||||
MXLog.error("Failed sending live location with error: \(error)")
|
MXLog.error("Failed sending live location with error: \(error)")
|
||||||
return .failure(.sdkError(error))
|
return .failure(.sdkError(error))
|
||||||
|
|||||||
Reference in New Issue
Block a user