Software /
code /
prosody-modules
Changeset
6155:d80e398a2acc
mod_anti_spam: Also consider not a stranger if we have a pending (out) sub request
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 17 Jan 2025 11:02:02 +0000 |
parents | 6154:160d1bcfe341 |
children | 6156:bcad6baa4fc3 |
files | mod_anti_spam/mod_anti_spam.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_anti_spam/mod_anti_spam.lua Fri Jan 17 10:32:34 2025 +0000 +++ b/mod_anti_spam/mod_anti_spam.lua Fri Jan 17 11:02:02 2025 +0000 @@ -68,7 +68,11 @@ local to_session = full_sessions[stanza.attr.to]; if to_session then return false; end - if not (is_contact_subscribed(to_user, to_host, from_jid) or is_user_subscribed(to_user, to_host, from_jid)) then + if not ( + is_contact_subscribed(to_user, to_host, from_jid) or + is_user_subscribed(to_user, to_host, from_jid) or + is_contact_pending_out(to_user, to_host, from_jid) + ) then local from_user, from_host = jid_split(from_jid); -- Allow all messages from your own jid