# HG changeset patch # User Kim Alvefur # Date 1689778756 -7200 # Node ID e469642e6a6cbe5c3cb79f967767b32aeaa02700 # Parent 1893ae742f66a89ab4369147e6cd33aa6fa1092a mod_muc_block_pm: Allow private messages to yourself No harm in it. Beagle apparently uses it for XEP-0333 in public channels diff -r 1893ae742f66 -r e469642e6a6c mod_muc_block_pm/mod_muc_block_pm.lua --- a/mod_muc_block_pm/mod_muc_block_pm.lua Wed Jul 19 13:05:47 2023 +0200 +++ b/mod_muc_block_pm/mod_muc_block_pm.lua Wed Jul 19 16:59:16 2023 +0200 @@ -13,6 +13,10 @@ return -- messaging moderators is ok end + if to_occupant.bare_jid == from_occupant.bare_jid then + return -- to yourself is okay, used by some clients to sync read state in public channels + end + room:route_to_occupant(from_occupant, st.error_reply(stanza, "cancel", "policy-violation", "Private messages are disabled", room.jid)) return false; end, 1);