Mercurial > prosody-hg
diff 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 |
line wrap: on
line diff
--- a/plugins/mod_iq.lua Sun Jul 22 16:17:33 2012 +0100 +++ b/plugins/mod_iq.lua Sun Jul 22 17:08:09 2012 +0100 @@ -17,10 +17,7 @@ local origin, stanza = data.origin, data.stanza; local session = full_sessions[stanza.attr.to]; - if session then - -- TODO fire post processing event - session.send(stanza); - else -- resource not online + if not (session and session.send(stanza)) then if stanza.attr.type == "get" or stanza.attr.type == "set" then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); end
