Update Matrix SDK to v1.0.84-alpha (#1147)

* Fix build errors

* Add sendLocation API

* Amend cancelled behavior
This commit is contained in:
Alfonso Grillo
2023-06-23 17:14:38 +02:00
committed by GitHub
parent 9c115d8e25
commit 1f99e9af8d
8 changed files with 47 additions and 5 deletions
@@ -715,6 +715,27 @@ class RoomProxyMock: RoomProxyProtocol {
return sendFileUrlFileInfoProgressSubjectReturnValue
}
}
//MARK: - sendLocation
var sendLocationBodyGeoURICallsCount = 0
var sendLocationBodyGeoURICalled: Bool {
return sendLocationBodyGeoURICallsCount > 0
}
var sendLocationBodyGeoURIReceivedArguments: (body: String, geoURI: GeoURI)?
var sendLocationBodyGeoURIReceivedInvocations: [(body: String, geoURI: GeoURI)] = []
var sendLocationBodyGeoURIReturnValue: Result<Void, RoomProxyError>!
var sendLocationBodyGeoURIClosure: ((String, GeoURI) async -> Result<Void, RoomProxyError>)?
func sendLocation(body: String, geoURI: GeoURI) async -> Result<Void, RoomProxyError> {
sendLocationBodyGeoURICallsCount += 1
sendLocationBodyGeoURIReceivedArguments = (body: body, geoURI: geoURI)
sendLocationBodyGeoURIReceivedInvocations.append((body: body, geoURI: geoURI))
if let sendLocationBodyGeoURIClosure = sendLocationBodyGeoURIClosure {
return await sendLocationBodyGeoURIClosure(body, geoURI)
} else {
return sendLocationBodyGeoURIReturnValue
}
}
//MARK: - retrySend
var retrySendTransactionIDCallsCount = 0