diff options
author | fiaxh <git@mx.ax.lt> | 2017-10-22 17:24:16 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-10-22 18:26:31 +0200 |
commit | 749edd21b905006557cef593c2ded9284fb19313 (patch) | |
tree | 6a0ecda5d255e61fb139ef9528af067300caa2ff /xmpp-vala/src | |
parent | 128a015d45031f2b064f3a8e4d6bb99579eefd60 (diff) | |
download | dino-749edd21b905006557cef593c2ded9284fb19313.tar.gz dino-749edd21b905006557cef593c2ded9284fb19313.zip |
Add oob tag to http-upload messages
fixes #166
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r-- | xmpp-vala/src/module/xep/0066_out_of_band_data.vala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0066_out_of_band_data.vala b/xmpp-vala/src/module/xep/0066_out_of_band_data.vala new file mode 100644 index 00000000..b482252b --- /dev/null +++ b/xmpp-vala/src/module/xep/0066_out_of_band_data.vala @@ -0,0 +1,11 @@ +using Xmpp.Core; + +namespace Xmpp.Xep.OutOfBandData { + +public const string NS_URI = "jabber:x:oob"; + +public static void add_url_to_message(Message.Stanza message, string url, string? desc = null) { + message.stanza.put_node(new StanzaNode.build("x", NS_URI).add_self_xmlns().put_node(new StanzaNode.build("url", NS_URI).put_node(new StanzaNode.text(url)))); +} + +} |