comparison plugins/mod_iq.lua @ 4970:eeff01224865

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Jul 2012 17:08:09 +0100
parents 073eff2853a1
children 7838acadb0fa
comparison
equal deleted inserted replaced
4958:1f1c74ac9666 4970:eeff01224865
15 module:hook("iq/full", function(data) 15 module:hook("iq/full", function(data)
16 -- IQ to full JID recieved 16 -- IQ to full JID recieved
17 local origin, stanza = data.origin, data.stanza; 17 local origin, stanza = data.origin, data.stanza;
18 18
19 local session = full_sessions[stanza.attr.to]; 19 local session = full_sessions[stanza.attr.to];
20 if session then 20 if not (session and session.send(stanza)) then
21 -- TODO fire post processing event
22 session.send(stanza);
23 else -- resource not online
24 if stanza.attr.type == "get" or stanza.attr.type == "set" then 21 if stanza.attr.type == "get" or stanza.attr.type == "set" then
25 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); 22 origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
26 end 23 end
27 end 24 end
28 return true; 25 return true;