aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-12-02 16:16:44 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-12-02 16:16:44 +0500
commit8203bda99e6082e71d1bcdcabac530fb61340971 (patch)
treef673e98b1abecb96ba17368ca41f58773d945737
parent113cb3c67cbd9f90b03e229aa6129b1bf99fe84c (diff)
downloadprosody-8203bda99e6082e71d1bcdcabac530fb61340971.tar.gz
prosody-8203bda99e6082e71d1bcdcabac530fb61340971.zip
MUC: Give stanza handlers a negative priority, to allow mod_iq to process them first.
-rw-r--r--plugins/muc/mod_muc.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index e49486fc..329b9270 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -151,15 +151,15 @@ function stanza_handler(event)
handle_to_domain(origin, stanza);
return true;
end
-module:hook("iq/bare", stanza_handler);
-module:hook("message/bare", stanza_handler);
-module:hook("presence/bare", stanza_handler);
-module:hook("iq/full", stanza_handler);
-module:hook("message/full", stanza_handler);
-module:hook("presence/full", stanza_handler);
-module:hook("iq/host", stanza_handler);
-module:hook("message/host", stanza_handler);
-module:hook("presence/host", stanza_handler);
+module:hook("iq/bare", stanza_handler, -1);
+module:hook("message/bare", stanza_handler, -1);
+module:hook("presence/bare", stanza_handler, -1);
+module:hook("iq/full", stanza_handler, -1);
+module:hook("message/full", stanza_handler, -1);
+module:hook("presence/full", stanza_handler, -1);
+module:hook("iq/host", stanza_handler, -1);
+module:hook("message/host", stanza_handler, -1);
+module:hook("presence/host", stanza_handler, -1);
hosts[module.host].send = function(stanza) -- FIXME do a generic fix
if stanza.attr.type == "result" or stanza.attr.type == "error" then