Software /
code /
prosody-modules
Diff
mod_muc_moderation/mod_muc_moderation.lua @ 4750:98429b646bd4
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 06 Nov 2021 19:03:00 +0100 |
parent | 4749:3a7953a5ee5b |
child | 4754:4665df54719d |
line wrap: on
line diff
--- 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