mod_muc_block_pm: Allow private messages to yourself
No harm in it.
Beagle apparently uses it for XEP-0333 in public channels
--- 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);