mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update Matrix SDK to v1.0.84-alpha (#1147)
* Fix build errors * Add sendLocation API * Amend cancelled behavior
This commit is contained in:
@@ -348,6 +348,19 @@ class RoomProxy: RoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func sendLocation(body: String, geoURI: GeoURI) async -> Result<Void, RoomProxyError> {
|
||||
sendMessageBackgroundTask = backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||
defer {
|
||||
sendMessageBackgroundTask?.stop()
|
||||
}
|
||||
|
||||
let transactionId = genTransactionId()
|
||||
|
||||
return await Task.dispatch(on: userInitiatedDispatchQueue) {
|
||||
.success(self.room.sendLocation(body: body, geoUri: geoURI.string, txnId: transactionId))
|
||||
}
|
||||
}
|
||||
|
||||
func retrySend(transactionID: String) async {
|
||||
sendMessageBackgroundTask = backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||
defer {
|
||||
|
||||
@@ -41,6 +41,7 @@ enum RoomProxyError: Error {
|
||||
case failedSettingRoomTopic
|
||||
case failedRemovingAvatar
|
||||
case failedUploadingAvatar
|
||||
case failedSendingLocation
|
||||
}
|
||||
|
||||
@MainActor
|
||||
@@ -101,6 +102,8 @@ protocol RoomProxyProtocol {
|
||||
|
||||
func sendFile(url: URL, fileInfo: FileInfo, progressSubject: CurrentValueSubject<Double, Never>?) async -> Result<Void, RoomProxyError>
|
||||
|
||||
func sendLocation(body: String, geoURI: GeoURI) async -> Result<Void, RoomProxyError>
|
||||
|
||||
/// Retries sending a failed message given its transaction ID
|
||||
func retrySend(transactionID: String) async
|
||||
|
||||
|
||||
Reference in New Issue
Block a user