Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 3675:cd3a1ae596b4
MUC: Give stanza handlers a negative priority, to allow mod_iq to process them first.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 02 Dec 2010 16:16:44 +0500 |
parent | 3628:576103409c7a |
child | 4260:403aba5e49d5 |
comparison
equal
deleted
inserted
replaced
3674:4b7281c577b9 | 3675:cd3a1ae596b4 |
---|---|
149 end | 149 end |
150 -- to the main muc domain | 150 -- to the main muc domain |
151 handle_to_domain(origin, stanza); | 151 handle_to_domain(origin, stanza); |
152 return true; | 152 return true; |
153 end | 153 end |
154 module:hook("iq/bare", stanza_handler); | 154 module:hook("iq/bare", stanza_handler, -1); |
155 module:hook("message/bare", stanza_handler); | 155 module:hook("message/bare", stanza_handler, -1); |
156 module:hook("presence/bare", stanza_handler); | 156 module:hook("presence/bare", stanza_handler, -1); |
157 module:hook("iq/full", stanza_handler); | 157 module:hook("iq/full", stanza_handler, -1); |
158 module:hook("message/full", stanza_handler); | 158 module:hook("message/full", stanza_handler, -1); |
159 module:hook("presence/full", stanza_handler); | 159 module:hook("presence/full", stanza_handler, -1); |
160 module:hook("iq/host", stanza_handler); | 160 module:hook("iq/host", stanza_handler, -1); |
161 module:hook("message/host", stanza_handler); | 161 module:hook("message/host", stanza_handler, -1); |
162 module:hook("presence/host", stanza_handler); | 162 module:hook("presence/host", stanza_handler, -1); |
163 | 163 |
164 hosts[module.host].send = function(stanza) -- FIXME do a generic fix | 164 hosts[module.host].send = function(stanza) -- FIXME do a generic fix |
165 if stanza.attr.type == "result" or stanza.attr.type == "error" then | 165 if stanza.attr.type == "result" or stanza.attr.type == "error" then |
166 core_post_stanza(component, stanza); | 166 core_post_stanza(component, stanza); |
167 else error("component.send only supports result and error stanzas at the moment"); end | 167 else error("component.send only supports result and error stanzas at the moment"); end |