Change API MatrixClient.joinRoom(roomId: RoomId): Result<RoomId> to MatrixClient.joinRoom(roomId: RoomId): Result<Unit>

This commit is contained in:
Benoit Marty 2024-04-19 18:05:57 +02:00 committed by Benoit Marty
parent e7af09d4bb
commit f29e79d64e
9 changed files with 22 additions and 20 deletions

View file

@ -440,7 +440,7 @@ class RustMatrixClient(
runCatching { client.removeAvatar() }
}
override suspend fun joinRoom(roomId: RoomId): Result<RoomId> = withContext(sessionDispatcher) {
override suspend fun joinRoom(roomId: RoomId): Result<Unit> = withContext(sessionDispatcher) {
runCatching {
client.joinRoomById(roomId.value).destroy()
try {
@ -448,7 +448,6 @@ class RustMatrixClient(
} catch (e: Exception) {
Timber.e(e, "Timeout waiting for the room to be available in the room list")
}
roomId
}
}