comparison mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua @ 2903:01692f0052e8

mod_cache_c2s_caps: Use prosody.full_sessions instead of _G.full_sessions (thanks luacheck)
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 07 Mar 2018 17:42:38 +0100
parents 037ad1cd0d31
children 43adc18ff9f3
comparison
equal deleted inserted replaced
2902:037ad1cd0d31 2903:01692f0052e8
12 end 12 end
13 13
14 local to = stanza.attr.to; 14 local to = stanza.attr.to;
15 local node = query.attr.node; 15 local node = query.attr.node;
16 16
17 local target_session = full_sessions[to]; 17 local target_session = prosody.full_sessions[to];
18 local disco_info = target_session.caps_cache; 18 local disco_info = target_session.caps_cache;
19 if disco_info ~= nil and (node == nil or node == disco_info.attr.node) then 19 if disco_info ~= nil and (node == nil or node == disco_info.attr.node) then
20 local iq = st.reply(stanza); 20 local iq = st.reply(stanza);
21 iq:add_child(st.clone(disco_info)); 21 iq:add_child(st.clone(disco_info));
22 module:log("debug", "Answering disco#info on the behalf of the recipient") 22 module:log("debug", "Answering disco#info on the behalf of the recipient")