Comparison

mod_tcpproxy/mod_tcpproxy.lua @ 283:10c3f6c6a04c

mod_tcpproxy: 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:23:45 +0500
parent 277:07c1c3eaf0c4
child 1343:7dbde05b48a9
comparison
equal deleted inserted replaced
282:e5cc0fe5eec3 283:10c3f6c6a04c
106 106
107 local function stanza_handler(event) 107 local function stanza_handler(event)
108 proxy_component(event.origin, event.stanza); 108 proxy_component(event.origin, event.stanza);
109 return true; 109 return true;
110 end 110 end
111 module:hook("iq/bare", stanza_handler); 111 module:hook("iq/bare", stanza_handler, -1);
112 module:hook("message/bare", stanza_handler); 112 module:hook("message/bare", stanza_handler, -1);
113 module:hook("presence/bare", stanza_handler); 113 module:hook("presence/bare", stanza_handler, -1);
114 module:hook("iq/full", stanza_handler); 114 module:hook("iq/full", stanza_handler, -1);
115 module:hook("message/full", stanza_handler); 115 module:hook("message/full", stanza_handler, -1);
116 module:hook("presence/full", stanza_handler); 116 module:hook("presence/full", stanza_handler, -1);
117 module:hook("iq/host", stanza_handler); 117 module:hook("iq/host", stanza_handler, -1);
118 module:hook("message/host", stanza_handler); 118 module:hook("message/host", stanza_handler, -1);
119 module:hook("presence/host", stanza_handler); 119 module:hook("presence/host", stanza_handler, -1);
120 120
121 require "core.componentmanager".register_component(host, function() end); -- COMPAT Prosody 0.7 121 require "core.componentmanager".register_component(host, function() end); -- COMPAT Prosody 0.7