Update SDK to 1.0.94-alpha (#1232)

* Update SDK

* Map new location fields

* Add LocationRoomTimelineItemContent.AssetType
This commit is contained in:
Alfonso Grillo
2023-07-04 08:39:32 +02:00
committed by GitHub
parent 4162036f83
commit caf23094b0
16 changed files with 89 additions and 36 deletions
+11 -2
View File
@@ -372,7 +372,11 @@ class RoomProxy: RoomProxyProtocol {
return .success(())
}
func sendLocation(body: String, geoURI: GeoURI) async -> Result<Void, RoomProxyError> {
func sendLocation(body: String,
geoURI: GeoURI,
description: String?,
zoomLevel: UInt8?,
assetType: AssetType?) async -> Result<Void, RoomProxyError> {
sendMessageBackgroundTask = backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
defer {
sendMessageBackgroundTask?.stop()
@@ -381,7 +385,12 @@ class RoomProxy: RoomProxyProtocol {
let transactionId = genTransactionId()
return await Task.dispatch(on: userInitiatedDispatchQueue) {
.success(self.room.sendLocation(body: body, geoUri: geoURI.string, txnId: transactionId))
.success(self.room.sendLocation(body: body,
geoUri: geoURI.string,
description: description,
zoomLevel: zoomLevel,
assetType: assetType,
txnId: transactionId))
}
}
@@ -115,7 +115,11 @@ protocol RoomProxyProtocol {
progressSubject: CurrentValueSubject<Double, Never>?,
requestHandle: (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, RoomProxyError>
func sendLocation(body: String, geoURI: GeoURI) async -> Result<Void, RoomProxyError>
func sendLocation(body: String,
geoURI: GeoURI,
description: String?,
zoomLevel: UInt8?,
assetType: AssetType?) async -> Result<Void, RoomProxyError>
/// Retries sending a failed message given its transaction ID
func retrySend(transactionID: String) async