mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Knocked Preview implementation (#3426)
* JoinRoomScreen ui for knocking * code improvement * updated previews * added knocked state with tests * send knock request * Apply suggestions from code review Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * pr comments * update tests * new API * knock implementation and cancel knock * update strings * added a knocked cell in the home screen * design update * updated SDK * simplified the invite case code * pr comments * updated previews * added message as reason * updated strings * fixing tests --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -417,7 +417,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
func knockRoom(_ roomID: String, via: [String], message: String?) async -> Result<Void, ClientProxyError> {
|
||||
do {
|
||||
let _ = try await client.knock(roomIdOrAlias: roomID, reason: nil, serverNames: via)
|
||||
let _ = try await client.knock(roomIdOrAlias: roomID, reason: message, serverNames: via)
|
||||
await waitForRoomToSync(roomID: roomID, timeout: .seconds(30))
|
||||
return .success(())
|
||||
} catch {
|
||||
@@ -428,7 +428,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
func knockRoomAlias(_ roomAlias: String, message: String?) async -> Result<Void, ClientProxyError> {
|
||||
do {
|
||||
let room = try await client.knock(roomIdOrAlias: roomAlias, reason: nil, serverNames: [])
|
||||
let room = try await client.knock(roomIdOrAlias: roomAlias, reason: message, serverNames: [])
|
||||
await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30))
|
||||
return .success(())
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user