Software /
code /
prosody-modules
Comparison
mod_rest/jsonmap.lib.lua @ 4500:34c0f760f34a
mod_rest: Fix the OOB tag name which also differs in messages
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 07 Mar 2021 01:30:42 +0100 |
parent | 4499:8e644bf36627 |
child | 4501:42f43f1383db |
comparison
equal
deleted
inserted
replaced
4499:8e644bf36627 | 4500:34c0f760f34a |
---|---|
233 st2json = function (s) | 233 st2json = function (s) |
234 return s:get_child_text("url"); | 234 return s:get_child_text("url"); |
235 end; | 235 end; |
236 json2st = function (s) | 236 json2st = function (s) |
237 if type(s) == "string" then | 237 if type(s) == "string" then |
238 return st.stanza("query", { xmlns = "jabber:x:oob" }):text_tag("url", s); | 238 return st.stanza("x", { xmlns = "jabber:x:oob" }):text_tag("url", s); |
239 end | 239 end |
240 end; | 240 end; |
241 }; | 241 }; |
242 | 242 |
243 -- XEP-0432: Simple JSON Messaging | 243 -- XEP-0432: Simple JSON Messaging |