mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
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:
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user