mod_spam_reporting: Fallback string for missing 'reason'
authorKim Alvefur <zash@zash.se>
Wed, 25 Aug 2021 19:42:28 +0200
changeset 4666 a357c3e3bd32
parent 4665 e40ed7d93d68
child 4667 6e5572fc6840
mod_spam_reporting: Fallback string for missing 'reason' Already done in that other module but forgot to do it here.
mod_spam_reporting/mod_spam_reporting.lua
--- a/mod_spam_reporting/mod_spam_reporting.lua	Wed Aug 25 19:33:59 2021 +0200
+++ b/mod_spam_reporting/mod_spam_reporting.lua	Wed Aug 25 19:42:28 2021 +0200
@@ -33,7 +33,7 @@
 			end
 
 			if report_type then
-				module:log("warn", "Received report of %s from JID '%s', %s", report_type, jid, reason);
+				module:log("warn", "Received report of %s from JID '%s', %s", report_type, jid, reason or "no reason given");
 				module:fire_event(module.name.."/"..report_type.."-report", {
 					origin = event.origin, stanza = event.stanza, jid = jid,
 					item = item, report = report, reason = reason, });