aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2022-02-12 19:15:52 +0100
committerMarvin W <git@larma.de>2022-02-12 19:16:16 +0100
commit3f169c64d70ee3c4b735d31744be154cccc85d67 (patch)
tree866ae924dfcf8de7a2c10579295d4c8edc907e4b /libdino/src/service
parent602834bdf777cf1c3909392dc52e5a3543f0ad0c (diff)
downloaddino-3f169c64d70ee3c4b735d31744be154cccc85d67.tar.gz
dino-3f169c64d70ee3c4b735d31744be154cccc85d67.zip
CIM: Announce accepted method
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/call_state.vala12
1 files changed, 11 insertions, 1 deletions
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();