Update the SDK and handle some API breaks. (#5986)

This commit is contained in:
Doug
2026-08-06 10:54:10 +01:00
committed by GitHub
parent d0fca495cb
commit f422208399
12 changed files with 568 additions and 101 deletions
@@ -777,7 +777,7 @@ class ClientProxy: ClientProxyProtocol {
}
}
func removeUserStatus() async -> Result<Void, ClientProxyError> {
func clearUserStatus() async -> Result<Void, ClientProxyError> {
do {
try await client.clearUserStatus()
// No need to refresh the profile, we only support user status with the profiles /sync extension.
@@ -788,17 +788,6 @@ class ClientProxy: ClientProxyProtocol {
}
}
func removeCallStatus() async -> Result<Void, ClientProxyError> {
do {
try await client.clearCallStatus()
// No need to refresh the profile, we only support user status with the profiles /sync extension.
return .success(())
} catch {
MXLog.error("Failed removing call status with error: \(error)")
return .failure(.sdkError(error))
}
}
func linkNewDeviceService() -> LinkNewDeviceServiceProtocol {
LinkNewDeviceService(handler: client.newGrantLoginWithQrCodeHandler())
}
@@ -229,8 +229,8 @@ protocol ClientProxyProtocol: AnyObject {
func removeUserAvatar() async -> Result<Void, ClientProxyError>
func isUserStatusSupported() async -> Result<Bool, ClientProxyError>
func setUserStatus(_ status: UserStatus.Raw) async -> Result<Void, ClientProxyError>
func removeUserStatus() async -> Result<Void, ClientProxyError>
func removeCallStatus() async -> Result<Void, ClientProxyError>
/// Removes both the `m.status` and `m.call` fields from the user's profile.
func clearUserStatus() async -> Result<Void, ClientProxyError>
func linkNewDeviceService() -> LinkNewDeviceServiceProtocol