# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1615076780 -3600
# Node ID 8e644bf36627b37715dc757f989f1dbbf747e455
# Parent  1776831d0fab4c8fbb427900a50ad79429a867d5
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.

diff -r 1776831d0fab -r 8e644bf36627 mod_rest/jsonmap.lib.lua
--- 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;
 	};