diff options
Diffstat (limited to 'main/src/ui')
-rw-r--r-- | main/src/ui/chat_input/chat_input_controller.vala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/chat_input/chat_input_controller.vala b/main/src/ui/chat_input/chat_input_controller.vala index eeaddaab..d7a69c3d 100644 --- a/main/src/ui/chat_input/chat_input_controller.vala +++ b/main/src/ui/chat_input/chat_input_controller.vala @@ -122,9 +122,11 @@ public class ChatInputController : Object { return; case "/affiliate": if (token.length > 1) { - string[] user_role = token[1].split(" ", 2); - if (user_role.length == 2) { - stream_interactor.get_module(MucManager.IDENTITY).change_affiliation(conversation.account, conversation.counterpart, user_role[0].strip(), user_role[1].strip()); + string[] user_role = token[1].split(" "); + if (user_role.length >= 2) { + string nick = string.joinv(" ", user_role[0:user_role.length - 1]).strip(); + string role = user_role[user_role.length - 1].strip(); + stream_interactor.get_module(MucManager.IDENTITY).change_affiliation(conversation.account, conversation.counterpart, nick, role); } } return; |