From 3f169c64d70ee3c4b735d31744be154cccc85d67 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 12 Feb 2022 19:15:52 +0100 Subject: CIM: Announce accepted method --- libdino/src/service/call_state.vala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libdino/src/service') diff --git a/libdino/src/service/call_state.vala b/libdino/src/service/call_state.vala index c1f0522d..452deb4f 100644 --- a/libdino/src/service/call_state.vala +++ b/libdino/src/service/call_state.vala @@ -100,7 +100,17 @@ public class Dino.CallState : Object { if (use_cim) { XmppStream stream = stream_interactor.get_stream(call.account); if (stream == null) return; - stream.get_module(Xep.CallInvites.Module.IDENTITY).send_accept(stream, cim_counterpart, cim_call_id, cim_message_type); + StanzaNode? inner_node = null; + if (group_call != null) { + inner_node = new StanzaNode.build("muji", Xep.Muji.NS_URI).add_self_xmlns() + .put_attribute("room", group_call.muc_jid.to_string()); + } else if (peers.size == 1) { + foreach (PeerState peer in peers.values) { + inner_node = new StanzaNode.build("jingle", Xep.CallInvites.NS_URI) + .put_attribute("sid", peer.sid); + } + } + stream.get_module(Xep.CallInvites.Module.IDENTITY).send_accept(stream, cim_counterpart, cim_call_id, inner_node, cim_message_type); } else { foreach (PeerState peer in peers.values) { peer.accept(); -- cgit v1.2.3-70-g09d2