Changeset

6115:b644832a8290

mod_anti_spam: Fix syntax of user_exists() check (thanks Martin/Zash)
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Dec 2024 15:25:33 +0000
parents 6114:dc2cce03554d
children 6116:edf10a1bee7d
files mod_anti_spam/mod_anti_spam.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_anti_spam/mod_anti_spam.lua	Sat Dec 28 15:23:33 2024 +0000
+++ b/mod_anti_spam/mod_anti_spam.lua	Sat Dec 28 15:25:33 2024 +0000
@@ -130,9 +130,9 @@
 end
 
 module:hook("message/bare", function (event)
-	local to_bare = jid_bare(event.stanza.attr.to);
+	local to_user, to_host = jid_split(event.stanza.attr.to);
 
-	if not user_exists(to_bare) then return; end
+	if not user_exists(to_user, to_host) then return; end
 
 	local from_bare = jid_bare(event.stanza.attr.from);
 	if not is_from_stranger(from_bare, event) then return; end