You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressPresenter.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ class EditRoomAddressPresenter @AssistedInject constructor(
99
99
suspend {
100
100
val savedCanonicalAlias = room.canonicalAlias
101
101
val savedAliasFromHomeserver = room.firstAliasMatching(serverName)
102
-
val newRoomAlias = client.roomAliasFromName(newRoomAddress).getOrThrow()
102
+
val newRoomAlias = client.roomAliasFromName(newRoomAddress)?:throwIllegalArgumentException("Invalid room address")
103
103
104
104
// First publish the new alias in the room directory
Copy file name to clipboardexpand all lines: libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/room/address/RoomAddressValidityEffect.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ fun RoomAddressValidityEffect(
32
32
}
33
33
// debounce the room address validation
34
34
delay(300)
35
-
val roomAlias = client.roomAliasFromName(newRoomAddress).getOrNull()
35
+
val roomAlias = client.roomAliasFromName(newRoomAddress)
36
36
if (roomAlias ==null||!roomAliasHelper.isRoomAliasValid(roomAlias)) {
0 commit comments