diff options
author | fiaxh <git@lightrise.org> | 2020-11-11 11:27:31 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-11-11 11:27:31 +0100 |
commit | 10adf716f3b94073f099dfb18ecdaf41dafcab2d (patch) | |
tree | c732f058d30a86092be3d92d1e3fbf40c9d7c1ac /main/src/ui/application.vala | |
parent | b2c7e9dfff2e00549fc23ad8e531d77daa6c2738 (diff) | |
download | dino-10adf716f3b94073f099dfb18ecdaf41dafcab2d.tar.gz dino-10adf716f3b94073f099dfb18ecdaf41dafcab2d.zip |
Fix incoming muc voice request notification
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r-- | main/src/ui/application.vala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 90c83562..7c473d2f 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -138,11 +138,14 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { }); add_action(accept_muc_invite_action); - SimpleAction accept_voice_request_action = new SimpleAction("accept-voice-request", VariantType.INT32); + SimpleAction accept_voice_request_action = new SimpleAction("accept-voice-request", new VariantType.tuple(new VariantType[]{VariantType.INT32, VariantType.STRING})); accept_voice_request_action.activate.connect((variant) => { - Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_by_id(variant.get_int32()); + int conversation_id = variant.get_child_value(0).get_int32(); + Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_by_id(conversation_id); if (conversation == null) return; - stream_interactor.get_module(MucManager.IDENTITY).change_role(conversation.account, conversation.counterpart, conversation.nickname, "participant"); + + string nick = variant.get_child_value(1).get_string(); + stream_interactor.get_module(MucManager.IDENTITY).change_role(conversation.account, conversation.counterpart, nick, "participant"); }); add_action(accept_voice_request_action); |