Diff

plugins/mod_muc_mam.lua @ 10111:0f335815244f

plugins: Remove tostring call from logging Taken care of by loggingmanager now Mass-rewrite using lua pattern like `tostring%b()`
author Kim Alvefur <zash@zash.se>
date Tue, 30 Jul 2019 02:29:36 +0200
parent 10030:98ef41a60fc3
child 10119:29733134c76c
line wrap: on
line diff
--- a/plugins/mod_muc_mam.lua	Tue Jul 30 02:24:06 2019 +0200
+++ b/plugins/mod_muc_mam.lua	Tue Jul 30 02:29:36 2019 +0200
@@ -251,7 +251,7 @@
 	end
 
 	-- That's all folks!
-	module:log("debug", "Archive query %s completed", tostring(qid));
+	module:log("debug", "Archive query %s completed", qid);
 
 	origin.send(st.reply(stanza)
 		:tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete })
@@ -291,7 +291,7 @@
 	local data, err = archive:find(jid_split(room_jid), query);
 
 	if not data then
-		module:log("error", "Could not fetch history: %s", tostring(err));
+		module:log("error", "Could not fetch history: %s", err);
 		return
 	end
 
@@ -317,7 +317,7 @@
 			maxchars = maxchars - chars;
 		end
 		history[i], i = item, i+1;
-		-- module:log("debug", tostring(item));
+		-- module:log("debug", item);
 	end
 	function event.next_stanza()
 		i = i - 1;