Changeset

3081:e0ef90e96931

mod_auto_answer_disco_info: Switch to origin.log to provide better debug to admins.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 01 Jun 2018 18:40:30 +0200
parents 3080:b003d72d9ce6
children 3082:1cff081abbed
files mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua	Fri Jun 01 18:33:53 2018 +0200
+++ b/mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua	Fri Jun 01 18:40:30 2018 +0200
@@ -3,7 +3,7 @@
 local st = require "util.stanza";
 
 local function iq_stanza_handler(event)
-	local stanza = event.stanza;
+	local stanza, origin = event.stanza, event.origin;
 	local type = stanza.attr.type;
 
 	local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info");
@@ -23,7 +23,7 @@
 	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));
-		module:log("debug", "Answering disco#info on the behalf of %s", to);
+		origin.log("debug", "Answering disco#info on the behalf of %s", to);
 		module:send(iq);
 		return true;
 	end