# HG changeset patch # User Kim Alvefur # Date 1439234011 -7200 # Node ID c353acd1d366b67f036390965cb42ab1bf350f96 # Parent fb2b9a2e2316e59d844507f3c7e8230382ff9fd7# Parent e7b5ab44339c8d6fa58373b5d9eb65f5006841ae Merge with Goffi diff -r fb2b9a2e2316 -r c353acd1d366 mod_delegation/mod_delegation.lua --- 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 diff -r fb2b9a2e2316 -r c353acd1d366 mod_privilege/mod_privilege.lua --- 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)