diff options
author | Marvin W <git@larma.de> | 2022-02-12 19:15:52 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2022-02-12 19:16:16 +0100 |
commit | 3f169c64d70ee3c4b735d31744be154cccc85d67 (patch) | |
tree | 866ae924dfcf8de7a2c10579295d4c8edc907e4b /xmpp-vala/src/module/xep | |
parent | 602834bdf777cf1c3909392dc52e5a3543f0ad0c (diff) | |
download | dino-3f169c64d70ee3c4b735d31744be154cccc85d67.tar.gz dino-3f169c64d70ee3c4b735d31744be154cccc85d67.zip |
CIM: Announce accepted method
Diffstat (limited to 'xmpp-vala/src/module/xep')
-rw-r--r-- | xmpp-vala/src/module/xep/0166_jingle/session.vala | 2 | ||||
-rw-r--r-- | xmpp-vala/src/module/xep/0353_call_invite_message.vala | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle/session.vala b/xmpp-vala/src/module/xep/0166_jingle/session.vala index 577792ff..53a9c58d 100644 --- a/xmpp-vala/src/module/xep/0166_jingle/session.vala +++ b/xmpp-vala/src/module/xep/0166_jingle/session.vala @@ -426,7 +426,7 @@ public class Xmpp.Xep.Jingle.Session : Object { reason_node.put_node(new StanzaNode.build(reason_name, NS_URI)); } if (reason_text != null) { - reason_node.put_node(new StanzaNode.text(reason_text)); + reason_node.put_node(new StanzaNode.build("text", NS_URI).put_node(new StanzaNode.text(reason_text))); } terminate_iq.put_node(reason_node); } diff --git a/xmpp-vala/src/module/xep/0353_call_invite_message.vala b/xmpp-vala/src/module/xep/0353_call_invite_message.vala index 38d87f43..8031beaf 100644 --- a/xmpp-vala/src/module/xep/0353_call_invite_message.vala +++ b/xmpp-vala/src/module/xep/0353_call_invite_message.vala @@ -40,8 +40,14 @@ namespace Xmpp.Xep.CallInvites { send_message(stream, to, call_id, "retract", "cancel", message_type); } - public void send_accept(XmppStream stream, Jid to, string call_id, string message_type) { - send_message(stream, to, call_id, "accept", null, message_type); + public void send_accept(XmppStream stream, Jid inviter, string call_id, StanzaNode? inner_node, string message_type) { + StanzaNode accept_node = new StanzaNode.build("accept", NS_URI).add_self_xmlns() + .put_attribute("id", call_id); + if (inner_node != null) accept_node.put_node(inner_node); + MessageStanza invite_message = new MessageStanza() { to=inviter, type_=message_type }; + MessageProcessingHints.set_message_hint(invite_message, MessageProcessingHints.HINT_STORE); + invite_message.stanza.put_node(accept_node); + stream.get_module(MessageModule.IDENTITY).send_message.begin(stream, invite_message); } public void send_reject(XmppStream stream, Jid to, string call_id, string message_type) { |