Configure SDK to use the global/OS proxy (#2493)

This commit is contained in:
Mauro
2024-02-21 15:17:23 +01:00
committed by GitHub
parent d380c2de56
commit 9b949ce84e
10 changed files with 117 additions and 37 deletions
@@ -242,13 +242,11 @@ class RoomProxy: RoomProxyProtocol {
sendMessageBackgroundTask?.stop()
}
return await Task.dispatch(on: userInitiatedDispatchQueue) {
do {
try self.room.ignoreUser(userId: userID)
return .success(())
} catch {
return .failure(.failedReportingContent)
}
do {
try await room.ignoreUser(userId: userID)
return .success(())
} catch {
return .failure(.failedIgnoringUser)
}
}
@@ -21,6 +21,7 @@ import MatrixRustSDK
enum RoomProxyError: Error, Equatable {
case failedRedactingEvent
case failedReportingContent
case failedIgnoringUser
case failedRetrievingMember
case failedLeavingRoom
case failedAcceptingInvite