mod_component_roundrobin: Fix handshake (Thanks Julien)
authorKim Alvefur <zash@zash.se>
Wed, 18 Dec 2013 18:13:03 +0100
changeset 1252 08e50d742392
parent 1251 280adf09ae12
child 1253 19cf607111fb
mod_component_roundrobin: Fix handshake (Thanks Julien)
mod_component_roundrobin/mod_component_roundrobin.lua
--- a/mod_component_roundrobin/mod_component_roundrobin.lua	Sun Dec 15 00:51:48 2013 +0100
+++ b/mod_component_roundrobin/mod_component_roundrobin.lua	Wed Dec 18 18:13:03 2013 +0100
@@ -58,7 +58,7 @@
 function handle_component_auth(event)
 	local session, stanza = event.origin, event.stanza;
 	
-	if session.type ~= "component" then return; end
+	if session.type ~= "component_unauthed" then return; end
 	if sessions[session] then return; end
 
 	if (not session.host) or #stanza.tags > 0 then
@@ -92,4 +92,4 @@
 	return true;
 end
 
-module:hook("stanza/jabber:component:accept:handshake", handle_component_auth);
+module:hook("stanza/jabber:component:accept:handshake", handle_component_auth, 10);