Fix wrong parameter name

This commit is contained in:
Constantin Wartenburger 2020-10-13 15:10:57 +02:00
parent 24c67660c1
commit 5b6727408b
No known key found for this signature in database
GPG key ID: 7439D96D8E1DB894
2 changed files with 3 additions and 3 deletions

View file

@ -32,7 +32,7 @@ enum class Command(val command: String, val parameters: String, @StringRes val d
UNIGNORE_USER("/unignore", "<user-id>", R.string.command_description_unignore_user),
SET_USER_POWER_LEVEL("/op", "<user-id> [<power-level>]", R.string.command_description_op_user),
RESET_USER_POWER_LEVEL("/deop", "<user-id>", R.string.command_description_deop_user),
ROOM_NAME("/roomname", "<user-id>", R.string.command_description_room_name),
ROOM_NAME("/roomname", "<name>", R.string.command_description_room_name),
INVITE("/invite", "<user-id> [reason]", R.string.command_description_invite_user),
JOIN_ROOM("/join", "<room-alias> [reason]", R.string.command_description_join_room),
PART("/part", "<room-alias> [reason]", R.string.command_description_part_room),

View file

@ -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)