# HG changeset patch # User Matthew Wild # Date 1735658257 0 # Node ID 559648c7c8d60382419ae7e8ad5aa384aabec7b7 # Parent 4b1a4be434876af8a38c6d22b0d4ba76254cfa3f mod_anti_spam: Skip content filtering for messages with no body (thanks Martin) diff -r 4b1a4be43487 -r 559648c7c8d6 mod_anti_spam/mod_anti_spam.lua --- a/mod_anti_spam/mod_anti_spam.lua Mon Dec 30 13:54:30 2024 +0000 +++ b/mod_anti_spam/mod_anti_spam.lua Tue Dec 31 15:17:37 2024 +0000 @@ -92,6 +92,8 @@ if not (spammy_strings or spammy_patterns) then return; end local body = stanza:get_child_text("body"); + if not body then return; end + if spammy_strings then for _, s in ipairs(spammy_strings) do if body:find(s, 1, true) then