Mercurial > prosody-modules
diff 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 |
line wrap: on
line diff
--- a/mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua Fri Jun 08 11:49:29 2018 +0200 +++ b/mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua Fri Jun 08 15:25:27 2018 +0200 @@ -23,7 +23,8 @@ if disco_info ~= nil and (node == nil or node == disco_info.attr.node) then local iq = st.reply(stanza); iq:add_child(st.clone(disco_info)); - origin.log("debug", "Answering disco#info on the behalf of %s", to); + local log = origin.log or module._log; + log("debug", "Answering disco#info on the behalf of %s", to); module:send(iq); return true; end