mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Use new API awaitRoomRemoteEcho to wait for the created room to be available.
This commit is contained in:
+5
-3
@@ -311,14 +311,16 @@ class RustMatrixClient(
|
|||||||
avatar = createRoomParams.avatar,
|
avatar = createRoomParams.avatar,
|
||||||
powerLevelContentOverride = defaultRoomCreationPowerLevels,
|
powerLevelContentOverride = defaultRoomCreationPowerLevels,
|
||||||
)
|
)
|
||||||
val roomId = RoomId(client.createRoom(rustParams))
|
val roomId = client.createRoom(rustParams)
|
||||||
// Wait to receive the room back from the sync but do not returns failure if it fails.
|
// Wait to receive the room back from the sync but do not returns failure if it fails.
|
||||||
try {
|
try {
|
||||||
awaitJoinedRoom(roomId.toRoomIdOrAlias(), 30.seconds)
|
withTimeout(30.seconds) {
|
||||||
|
client.awaitRoomRemoteEcho(roomId)
|
||||||
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Timber.e(e, "Timeout waiting for the room to be available in the room list")
|
Timber.e(e, "Timeout waiting for the room to be available in the room list")
|
||||||
}
|
}
|
||||||
roomId
|
RoomId(roomId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user