Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4159

This commit is contained in:
Stefan Ceriu
2024-10-22 17:07:33 +03:00
parent a4ea552a83
commit 8f9f8cbed0
9 changed files with 186 additions and 251 deletions
@@ -417,7 +417,6 @@ class ClientProxy: ClientProxyProtocol {
func knockRoom(_ roomID: String, message: String?) async -> Result<Void, ClientProxyError> {
do {
// TODO: It should also include a message but the API for is not available yet
let _ = try await client.knock(roomIdOrAlias: roomID)
await waitForRoomToSync(roomID: roomID, timeout: .seconds(30))
return .success(())
@@ -429,7 +428,6 @@ class ClientProxy: ClientProxyProtocol {
func knockRoomAlias(_ roomAlias: String, message: String?) async -> Result<Void, ClientProxyError> {
do {
// TODO: It should also include a message but the API for is not available yet
let room = try await client.knock(roomIdOrAlias: roomAlias)
await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30))
return .success(())
@@ -39,16 +39,7 @@ enum ClientProxyError: Error {
}
enum SlidingSyncConstants {
static let defaultTimelineLimit: UInt32 = 20
static let maximumVisibleRangeSize = 30
static let defaultRequiredState = [
RequiredState(key: "m.room.name", value: ""),
RequiredState(key: "m.room.topic", value: ""),
RequiredState(key: "m.room.avatar", value: ""),
RequiredState(key: "m.room.canonical_alias", value: ""),
RequiredState(key: "m.room.join_rules", value: ""),
RequiredState(key: "m.room.pinned_events", value: "")
]
}
/// This struct represents the configuration that we are using to register the application through Pusher to Sygnal