Mercurial > prosody-modules
changeset 4499:8e644bf36627
mod_rest: Change OOB namespace to the one used in messages
Because of it's current popularity as companion to HTTP Upload this is
probably more useful than the iq one.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 07 Mar 2021 01:26:20 +0100 |
parents | 1776831d0fab |
children | 34c0f760f34a |
files | mod_rest/jsonmap.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_rest/jsonmap.lib.lua Sun Mar 07 01:22:15 2021 +0100 +++ b/mod_rest/jsonmap.lib.lua Sun Mar 07 01:26:20 2021 +0100 @@ -228,13 +228,14 @@ }; -- XEP-0066: Out of Band Data - oob_url = { type = "func", xmlns = "jabber:iq:oob", tagname = "query", + oob_url = { type = "func", xmlns = "jabber:x:oob", tagname = "query", + -- XXX namespace depends on whether it's in an iq or message stanza st2json = function (s) return s:get_child_text("url"); end; json2st = function (s) if type(s) == "string" then - return st.stanza("query", { xmlns = "jabber:iq:oob" }):text_tag("url", s); + return st.stanza("query", { xmlns = "jabber:x:oob" }):text_tag("url", s); end end; };