diff --git a/vector/src/main/java/im/vector/app/features/command/Command.kt b/vector/src/main/java/im/vector/app/features/command/Command.kt index b74b608e32..81bbf8177d 100644 --- a/vector/src/main/java/im/vector/app/features/command/Command.kt +++ b/vector/src/main/java/im/vector/app/features/command/Command.kt @@ -32,7 +32,7 @@ enum class Command(val command: String, val parameters: String, @StringRes val d UNIGNORE_USER("/unignore", "", R.string.command_description_unignore_user), SET_USER_POWER_LEVEL("/op", " []", R.string.command_description_op_user), RESET_USER_POWER_LEVEL("/deop", "", R.string.command_description_deop_user), - ROOM_NAME("/roomname", "", R.string.command_description_room_name), + ROOM_NAME("/roomname", "", R.string.command_description_room_name), INVITE("/invite", " [reason]", R.string.command_description_invite_user), JOIN_ROOM("/join", " [reason]", R.string.command_description_join_room), PART("/part", " [reason]", R.string.command_description_part_room), diff --git a/vector/src/main/java/im/vector/app/features/command/CommandParser.kt b/vector/src/main/java/im/vector/app/features/command/CommandParser.kt index 41961c209a..29eba00490 100644 --- a/vector/src/main/java/im/vector/app/features/command/CommandParser.kt +++ b/vector/src/main/java/im/vector/app/features/command/CommandParser.kt @@ -91,7 +91,7 @@ object CommandParser { if (messageParts.size == 2) { val url = messageParts[1] - if (url.isNotEmpty() && url.startsWith("mxc://")) { + if (url.startsWith("mxc://")) { ParsedCommand.ChangeRoomAvatar(url) } else { ParsedCommand.ErrorSyntax(Command.ROOM_AVATAR) @@ -104,7 +104,7 @@ object CommandParser { if (messageParts.size == 2) { val url = messageParts[1] - if (url.isNotEmpty() && url.startsWith("mxc://")) { + if (url.startsWith("mxc://")) { ParsedCommand.ChangeAvatarForRoom(url) } else { ParsedCommand.ErrorSyntax(Command.CHANGE_AVATAR_FOR_ROOM)