aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2024-10-18 14:16:10 +0200
committerfiaxh <git@lightrise.org>2024-10-18 14:16:33 +0200
commit1e9a45f48143df6f3e36f3cd056a5b88271f8c2f (patch)
treeb8dd810c8f8536ef0a4801c562d251c65b9f0897 /libdino
parent3abe9fdb9ef485d048497da6046f0b12e421e869 (diff)
downloaddino-1e9a45f48143df6f3e36f3cd056a5b88271f8c2f.tar.gz
dino-1e9a45f48143df6f3e36f3cd056a5b88271f8c2f.zip
Use XEP-0482 for multi-party call invites
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/call_state.vala13
1 files changed, 4 insertions, 9 deletions
diff --git a/libdino/src/service/call_state.vala b/libdino/src/service/call_state.vala
index 65d33557..dc4589e3 100644
--- a/libdino/src/service/call_state.vala
+++ b/libdino/src/service/call_state.vala
@@ -100,17 +100,12 @@ public class Dino.CallState : Object {
if (use_cim) {
XmppStream stream = stream_interactor.get_stream(call.account);
if (stream == null) return;
- 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());
+ stream.get_module(Xep.CallInvites.Module.IDENTITY).send_muji_accept(stream, cim_counterpart, cim_call_id, group_call.muc_jid, cim_message_type);
} 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);
- }
+ string sid = peers.values.to_array()[0].sid;
+ stream.get_module(Xep.CallInvites.Module.IDENTITY).send_jingle_accept(stream, cim_counterpart, cim_call_id, sid, cim_message_type);
}
- 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();
@@ -156,7 +151,7 @@ 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_finish(stream, cim_counterpart, cim_call_id, cim_message_type);
+ stream.get_module(Xep.CallInvites.Module.IDENTITY).send_left(stream, cim_counterpart, cim_call_id, cim_message_type);
}
call.state = Call.State.ENDED;
} else if (call.state == Call.State.RINGING) {