--- a/mod_delegation/mod_delegation.lua Sat Jul 18 23:11:59 2015 +0200
+++ b/mod_delegation/mod_delegation.lua Mon Aug 10 21:13:31 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)
@@ -185,7 +187,7 @@
local iq = forwarded.tags[1]
if #forwarded ~= 1 or iq.name ~= "iq" or
iq.attr.xmlns ~= 'jabber:client' or
- (iq.attr.type =='result' and #iq ~= 1) or
+ (iq.attr.type =='result' and #iq > 1) or
(iq.attr.type == 'error' and #iq > 2) then
module:log("warn", "ignoring invalid iq result from managing entity %s", stanza.attr.from)
stanza_cache[stanza.attr.from][stanza.attr.id] = nil
--- a/mod_privilege/mod_privilege.lua Sat Jul 18 23:11:59 2015 +0200
+++ b/mod_privilege/mod_privilege.lua Mon Aug 10 21:13:31 2015 +0200
@@ -176,7 +176,9 @@
end
end
-connected_cb:add(on_auth)
+if module:get_host_type() ~= "component" then
+ connected_cb:add(on_auth)
+end
module:hook('authentication-success', on_auth)
module:hook('component-authenticated', on_component_auth)
module:hook('presence/initial', on_presence)