# HG changeset patch # User Kim Alvefur # Date 1636221780 -3600 # Node ID 98429b646bd4d61628249fc50898376b2bf9e5bd # Parent 3a7953a5ee5b1ae7666c4bd7637b179a6367eb5a mod_muc_moderation: Use reserved nickname as fallback When moderation is invoked from a JID that is not joined, the nickname is not known, but we should include it in the broadcast for transparency. diff -r 3a7953a5ee5b -r 98429b646bd4 mod_muc_moderation/mod_muc_moderation.lua --- a/mod_muc_moderation/mod_muc_moderation.lua Sat Nov 06 16:19:38 2021 +0100 +++ b/mod_muc_moderation/mod_muc_moderation.lua Sat Nov 06 19:03:00 2021 +0100 @@ -63,6 +63,13 @@ return true; end + if not actor_nick then + local reserved_nickname = room:get_affiliation_data(jid.bare(actor), "reserved_nickname"); + if reserved_nickname then + actor_nick = jid.join(room.jid, reserved_nickname); + end + end + -- Original stanza to base tombstone on local original, err; if muc_log_archive.get then