Diff

mod_anti_spam/mod_anti_spam.lua @ 6154:160d1bcfe341

mod_anti_spam: Optimization to avoid needless string concatenation
author Matthew Wild <mwild1@gmail.com>
date Fri, 17 Jan 2025 10:32:34 +0000
parent 6153:ef7bf4215cb3
child 6155:d80e398a2acc
line wrap: on
line diff
--- a/mod_anti_spam/mod_anti_spam.lua	Fri Jan 17 10:31:41 2025 +0000
+++ b/mod_anti_spam/mod_anti_spam.lua	Fri Jan 17 10:32:34 2025 +0000
@@ -72,7 +72,7 @@
 		local from_user, from_host = jid_split(from_jid);
 
 		-- Allow all messages from your own jid
-		if from_jid == to_user.."@"..to_host then
+		if from_user == to_user and from_host == to_host then
 			return false; -- Pass through
 		end
 		if to_resource and stanza.attr.type == "groupchat" then