changeset 1252:08e50d742392

mod_component_roundrobin: Fix handshake (Thanks Julien)
author Kim Alvefur <zash@zash.se>
date Wed, 18 Dec 2013 18:13:03 +0100
parents 280adf09ae12
children 19cf607111fb
files mod_component_roundrobin/mod_component_roundrobin.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);