aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/notifications.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-11-11 11:27:31 +0100
committerfiaxh <git@lightrise.org>2020-11-11 11:27:31 +0100
commit10adf716f3b94073f099dfb18ecdaf41dafcab2d (patch)
treec732f058d30a86092be3d92d1e3fbf40c9d7c1ac /main/src/ui/notifications.vala
parentb2c7e9dfff2e00549fc23ad8e531d77daa6c2738 (diff)
downloaddino-10adf716f3b94073f099dfb18ecdaf41dafcab2d.tar.gz
dino-10adf716f3b94073f099dfb18ecdaf41dafcab2d.zip
Fix incoming muc voice request notification
Diffstat (limited to 'main/src/ui/notifications.vala')
-rw-r--r--main/src/ui/notifications.vala7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/src/ui/notifications.vala b/main/src/ui/notifications.vala
index c68ab0ff..134c757a 100644
--- a/main/src/ui/notifications.vala
+++ b/main/src/ui/notifications.vala
@@ -141,7 +141,7 @@ public class Notifications : Object {
GLib.Application.get_default().send_notification(null, notification);
}
- private async void on_voice_request_received(Account account, Jid room_jid, Jid from_jid, string? nick, string? role, string? label) {
+ private async void on_voice_request_received(Account account, Jid room_jid, Jid from_jid, string nick) {
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(room_jid, account, Conversation.Type.GROUPCHAT);
if (conversation == null) return;
@@ -156,9 +156,10 @@ public class Notifications : Object {
notification.set_icon(get_pixbuf_icon(jid_avatar));
} catch (Error e) { }
- notification.set_default_action_and_target_value("app.accept-voice-request", new Variant.int32(conversation.id));
+ Variant variant = new Variant.tuple(new Variant[] {new Variant.int32(conversation.id), new Variant.string(nick)});
+ notification.set_default_action_and_target_value("app.accept-voice-request", variant);
notification.add_button_with_target_value(_("Deny"), "app.deny-voice-request", conversation.id);
- notification.add_button_with_target_value(_("Accept"), "app.accept-voice-request", conversation.id);
+ notification.add_button_with_target_value(_("Accept"), "app.accept-voice-request", variant);
GLib.Application.get_default().send_notification(null, notification);
}