equal
deleted
inserted
replaced
226 -- else .. missing required attribute |
226 -- else .. missing required attribute |
227 end; |
227 end; |
228 }; |
228 }; |
229 |
229 |
230 -- XEP-0066: Out of Band Data |
230 -- XEP-0066: Out of Band Data |
231 oob_url = { type = "func", xmlns = "jabber:iq:oob", tagname = "query", |
231 oob_url = { type = "func", xmlns = "jabber:x:oob", tagname = "query", |
|
232 -- XXX namespace depends on whether it's in an iq or message stanza |
232 st2json = function (s) |
233 st2json = function (s) |
233 return s:get_child_text("url"); |
234 return s:get_child_text("url"); |
234 end; |
235 end; |
235 json2st = function (s) |
236 json2st = function (s) |
236 if type(s) == "string" then |
237 if type(s) == "string" then |
237 return st.stanza("query", { xmlns = "jabber:iq:oob" }):text_tag("url", s); |
238 return st.stanza("query", { xmlns = "jabber:x:oob" }):text_tag("url", s); |
238 end |
239 end |
239 end; |
240 end; |
240 }; |
241 }; |
241 |
242 |
242 -- XEP-0432: Simple JSON Messaging |
243 -- XEP-0432: Simple JSON Messaging |