From f25fadde2d6c9492b9cafe2cddbcc7b966942e47 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 11 Dec 2017 18:39:55 +0100 Subject: Fallback display for all file types --- xmpp-vala/src/module/xep/0066_out_of_band_data.vala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xmpp-vala/src/module') 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 index b482252b..804d406a 100644 --- a/xmpp-vala/src/module/xep/0066_out_of_band_data.vala +++ b/xmpp-vala/src/module/xep/0066_out_of_band_data.vala @@ -8,4 +8,8 @@ public static void add_url_to_message(Message.Stanza message, string url, string 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)))); } +public static string? get_url_from_message(Message.Stanza message) { + return message.stanza.get_deep_string_content(NS_URI + ":x", NS_URI + ":url"); +} + } -- cgit v1.2.3-70-g09d2