mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Knocking feature polishing part 2 (#3738)
* improved implementation of the unknown state * forget button in the banned state * error handling for forbidden access * added the forget function fixed DMs, and updated preview tests * removed banned room proxy * code polishing and test improvement
This commit is contained in:
@@ -413,6 +413,9 @@ class ClientProxy: ClientProxyProtocol {
|
||||
await waitForRoomToSync(roomID: roomID, timeout: .seconds(30))
|
||||
|
||||
return .success(())
|
||||
} catch ClientError.MatrixApi(.forbidden, _, _) {
|
||||
MXLog.error("Failed joining roomAlias: \(roomID) forbidden")
|
||||
return .failure(.forbiddenAccess)
|
||||
} catch {
|
||||
MXLog.error("Failed joining roomID: \(roomID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
@@ -426,6 +429,9 @@ class ClientProxy: ClientProxyProtocol {
|
||||
await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30))
|
||||
|
||||
return .success(())
|
||||
} catch ClientError.MatrixApi(.forbidden, _, _) {
|
||||
MXLog.error("Failed joining roomAlias: \(roomAlias) forbidden")
|
||||
return .failure(.forbiddenAccess)
|
||||
} catch {
|
||||
MXLog.error("Failed joining roomAlias: \(roomAlias) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
|
||||
@@ -30,6 +30,7 @@ enum ClientProxyLoadingState {
|
||||
|
||||
enum ClientProxyError: Error {
|
||||
case sdkError(Error)
|
||||
case forbiddenAccess
|
||||
|
||||
case invalidMedia
|
||||
case invalidServerName
|
||||
|
||||
Reference in New Issue
Block a user