Software /
code /
prosody
Comparison
core/stanza_router.lua @ 262:8c73fb2ff4a2
A treat for Linux users ;)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 16:03:33 +0000 |
parent | 257:762274c98040 |
child | 264:a296b61baad8 |
comparison
equal
deleted
inserted
replaced
261:790cf21e2af7 | 262:8c73fb2ff4a2 |
---|---|
30 | 30 |
31 local jid_split = require "util.jid".split; | 31 local jid_split = require "util.jid".split; |
32 local print = print; | 32 local print = print; |
33 | 33 |
34 function core_process_stanza(origin, stanza) | 34 function core_process_stanza(origin, stanza) |
35 log("debug", "Received["..origin.type.."]: "..tostring(st.reply(st.reply(stanza)))) | 35 log("debug", "Received[%s]: %s", origin.type, stanza:pretty_top_tag()) |
36 | 36 |
37 if not stanza.attr.xmlns then stanza.attr.xmlns = "jabber:client"; end -- FIXME Hack. This should be removed when we fix namespace handling. | 37 if not stanza.attr.xmlns then stanza.attr.xmlns = "jabber:client"; end -- FIXME Hack. This should be removed when we fix namespace handling. |
38 -- TODO verify validity of stanza (as well as JID validity) | 38 -- TODO verify validity of stanza (as well as JID validity) |
39 if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then | 39 if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then |
40 if stanza.attr.type == "set" or stanza.attr.type == "get" then | 40 if stanza.attr.type == "set" or stanza.attr.type == "get" then |