diff options
author | fiaxh <git@lightrise.org> | 2021-04-25 19:49:10 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-04-29 16:13:25 +0200 |
commit | 421f43dd8bd993eb88581e1b5011cc061ceb4fc8 (patch) | |
tree | 6495066b5e608188d8837dbcc133c5adc8e57c45 /xmpp-vala/src/module/iq/module.vala | |
parent | 5d85b6cdb0165d863aadd25d9a73707b8f5cc83e (diff) | |
download | dino-421f43dd8bd993eb88581e1b5011cc061ceb4fc8.tar.gz dino-421f43dd8bd993eb88581e1b5011cc061ceb4fc8.zip |
Add support for OMEMO call encryption
Diffstat (limited to 'xmpp-vala/src/module/iq/module.vala')
-rw-r--r-- | xmpp-vala/src/module/iq/module.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/iq/module.vala b/xmpp-vala/src/module/iq/module.vala index 56605d01..17cd3f0d 100644 --- a/xmpp-vala/src/module/iq/module.vala +++ b/xmpp-vala/src/module/iq/module.vala @@ -6,6 +6,9 @@ namespace Xmpp.Iq { public class Module : XmppStreamNegotiationModule { public static ModuleIdentity<Module> IDENTITY = new ModuleIdentity<Module>(NS_URI, "iq_module"); + public signal void preprocess_incoming_iq_set_get(XmppStream stream, Stanza iq_stanza); + public signal void preprocess_outgoing_iq_set_get(XmppStream stream, Stanza iq_stanza); + private HashMap<string, ResponseListener> responseListeners = new HashMap<string, ResponseListener>(); private HashMap<string, ArrayList<Handler>> namespaceRegistrants = new HashMap<string, ArrayList<Handler>>(); @@ -23,6 +26,7 @@ namespace Xmpp.Iq { public delegate void OnResult(XmppStream stream, Iq.Stanza iq); public void send_iq(XmppStream stream, Iq.Stanza iq, owned OnResult? listener = null) { + preprocess_outgoing_iq_set_get(stream, iq); stream.write(iq.stanza); if (listener != null) { responseListeners[iq.id] = new ResponseListener((owned) listener); @@ -70,6 +74,7 @@ namespace Xmpp.Iq { } else { Gee.List<StanzaNode> children = node.get_all_subnodes(); if (children.size == 1 && namespaceRegistrants.has_key(children[0].ns_uri)) { + preprocess_incoming_iq_set_get(stream, iq); Gee.List<Handler> handlers = namespaceRegistrants[children[0].ns_uri]; foreach (Handler handler in handlers) { if (iq.type_ == Iq.Stanza.TYPE_GET) { |