mod_delegation: fixed bad calling of on_auth for components
authorGoffi <goffi@goffi.org>
Fri, 31 Jul 2015 18:46:27 +0200
changeset 1780 e7b5ab44339c
parent 1779 0d78bb31348e
child 1781 c353acd1d366
mod_delegation: fixed bad calling of on_auth for components
mod_delegation/mod_delegation.lua
--- a/mod_delegation/mod_delegation.lua	Fri Jul 31 18:46:06 2015 +0200
+++ b/mod_delegation/mod_delegation.lua	Fri Jul 31 18:46:27 2015 +0200
@@ -143,7 +143,9 @@
 	end
 end
 
-connected_cb:add(on_component_connected)
+if module:get_host_type() ~= "component" then
+    connected_cb:add(on_component_connected)
+end
 module:hook('component-authenticated', on_component_auth)
 module:hook('presence/initial', on_presence)