1
0
forked from mirrors/0ad

List reason for role change in MUC

Shows the reason for the role change in the status message. This is
mostly relevant for communicating the reason and possibly duration for a
moderator or bot muting a user.

Refs: #5679
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2026-01-04 20:31:45 +01:00
parent 5255b919d9
commit d070bf66b3
2 changed files with 5 additions and 1 deletions
@@ -94,6 +94,9 @@ ChatMessageEvents.Role = class
txt = sprintf(roleType.nick, this.args);
}
if (message.reason)
txt = sprintf(translate("%(rolechangemessage)s Reason: %(reason)s"), { "rolechangemessage": txt, "reason": message.reason });
this.chatMessagesPanel.addText(
message.time,
this.statusMessageFormat.format(txt));
+2 -1
View File
@@ -1110,7 +1110,8 @@ void XmppClient::handleMUCParticipantPresence(gloox::MUCRoom*, const gloox::MUCR
std::time(nullptr),
"nick", nick,
"oldrole", it->second.m_Role,
"newrole", participant.role);
"newrole", participant.role,
"reason", participant.reason);
}
else
{