Do not rely on RoomAlias constructor to validate the Room alias, since there is no validation in release mode.
This is fixing the test in release mode.
This commit is contained in:
parent
247148df6b
commit
1d5e78496c
3 changed files with 10 additions and 7 deletions
|
|
@ -99,7 +99,7 @@ class EditRoomAddressPresenter @AssistedInject constructor(
|
|||
suspend {
|
||||
val savedCanonicalAlias = room.canonicalAlias
|
||||
val savedAliasFromHomeserver = room.firstAliasMatching(serverName)
|
||||
val newRoomAlias = client.roomAliasFromName(newRoomAddress).getOrThrow()
|
||||
val newRoomAlias = client.roomAliasFromName(newRoomAddress) ?: throw IllegalArgumentException("Invalid room address")
|
||||
|
||||
// First publish the new alias in the room directory
|
||||
room.publishRoomAliasInRoomDirectory(newRoomAlias).getOrThrow()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue