Mercurial > prosody-modules
comparison mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua @ 3106:1fe7da46e915
mod_auto_answer_disco_info: Don’t traceback on iqs coming from mod_muc.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 08 Jun 2018 15:25:27 +0200 |
parents | e0ef90e96931 |
children | 4cdd1ddae72c |
comparison
equal
deleted
inserted
replaced
3105:ce946d9d982e | 3106:1fe7da46e915 |
---|---|
21 | 21 |
22 local disco_info = target_session.caps_cache; | 22 local disco_info = target_session.caps_cache; |
23 if disco_info ~= nil and (node == nil or node == disco_info.attr.node) then | 23 if disco_info ~= nil and (node == nil or node == disco_info.attr.node) then |
24 local iq = st.reply(stanza); | 24 local iq = st.reply(stanza); |
25 iq:add_child(st.clone(disco_info)); | 25 iq:add_child(st.clone(disco_info)); |
26 origin.log("debug", "Answering disco#info on the behalf of %s", to); | 26 local log = origin.log or module._log; |
27 log("debug", "Answering disco#info on the behalf of %s", to); | |
27 module:send(iq); | 28 module:send(iq); |
28 return true; | 29 return true; |
29 end | 30 end |
30 end | 31 end |
31 | 32 |