Mercurial > prosody-modules
comparison mod_muc_rtbl/mod_muc_rtbl.lua @ 5890:ba71fdc8ea73
mod_muc_rtbl: Fix blocking of PMs from RTBL matches
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 23 Apr 2024 12:10:38 +0100 |
| parents | f6577cdb1d91 |
| children | 6e2458b69e33 |
comparison
equal
deleted
inserted
replaced
| 5889:2597e2113561 | 5890:ba71fdc8ea73 |
|---|---|
| 162 local bare_hash, host_hash = update_hashes(occupant); | 162 local bare_hash, host_hash = update_hashes(occupant); |
| 163 if banned_hashes[bare_hash] or banned_hashes[host_hash] then | 163 if banned_hashes[bare_hash] or banned_hashes[host_hash] then |
| 164 module:log("debug", "Blocked private message from user <%s> from room <%s> due to RTBL match", occupant.bare_jid, event.stanza.attr.to); | 164 module:log("debug", "Blocked private message from user <%s> from room <%s> due to RTBL match", occupant.bare_jid, event.stanza.attr.to); |
| 165 local error_reply = st.error_reply(event.stanza, "cancel", "forbidden", "You are banned from this service", event.room.jid); | 165 local error_reply = st.error_reply(event.stanza, "cancel", "forbidden", "You are banned from this service", event.room.jid); |
| 166 event.origin.send(error_reply); | 166 event.origin.send(error_reply); |
| 167 return true; | 167 return false; -- Don't route it |
| 168 end | 168 end |
| 169 end); | 169 end); |
| 170 | 170 |
| 171 if prosody.start_time then | 171 if prosody.start_time then |
| 172 request_list(); | 172 request_list(); |
