Software /
code /
prosody-modules
Diff
mod_rest/jsonmap.lib.lua @ 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 |
parent | 4473:3b50a9a75fb6 |
child | 4500:34c0f760f34a |
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; };