Join Room : makes sure we can join by alias

This commit is contained in:
ganfra 2024-07-23 21:17:35 +02:00
parent a888b4d43c
commit aebcc52309
16 changed files with 158 additions and 77 deletions

View file

@ -96,7 +96,7 @@ class JoinRoomPresenter @AssistedInject constructor(
}
else -> {
value = ContentState.Loading(roomIdOrAlias)
val result = matrixClient.getRoomPreviewFromRoomId(roomId, serverNames)
val result = matrixClient.getRoomPreview(roomIdOrAlias, serverNames)
value = result.fold(
onSuccess = { roomPreview ->
roomPreview.toContentState()
@ -153,7 +153,7 @@ class JoinRoomPresenter @AssistedInject constructor(
private fun CoroutineScope.joinRoom(joinAction: MutableState<AsyncAction<Unit>>) = launch {
joinAction.runUpdatingState {
joinRoom.invoke(
roomId = roomId,
roomIdOrAlias = roomIdOrAlias,
serverNames = serverNames,
trigger = trigger
)