Software /
code /
prosody-modules
Changeset
1777:c353acd1d366
Merge with Goffi
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Aug 2015 21:13:31 +0200 |
parents | 1773:fb2b9a2e2316 (current diff) 1776:e7b5ab44339c (diff) |
children | 1778:32604bf33a4c |
files | |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)