aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/application.vala
diff options
context:
space:
mode:
authorAnmol <godofwaranmol@gmail.com>2020-04-22 23:34:03 +0530
committerGitHub <noreply@github.com>2020-04-22 20:04:03 +0200
commit2631a9bdbaf9a40f329f05c55c6e2ea38efeb10c (patch)
treedfe6b0b3a390457b1c7d125b81a5c1d10019281c /main/src/ui/application.vala
parent51a23728694a3f1312cc9396fc093ca178457c3c (diff)
downloaddino-2631a9bdbaf9a40f329f05c55c6e2ea38efeb10c.tar.gz
dino-2631a9bdbaf9a40f329f05c55c6e2ea38efeb10c.zip
voice handling in moderated groups (#788)
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r--main/src/ui/application.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index 8738cd53..90c83562 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -138,6 +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);
+ accept_voice_request_action.activate.connect((variant) => {
+ Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_by_id(variant.get_int32());
+ if (conversation == null) return;
+ stream_interactor.get_module(MucManager.IDENTITY).change_role(conversation.account, conversation.counterpart, conversation.nickname, "participant");
+ });
+ add_action(accept_voice_request_action);
+
SimpleAction loop_conversations_action = new SimpleAction("loop_conversations", null);
loop_conversations_action.activate.connect(() => { window.loop_conversations(false); });
add_action(loop_conversations_action);