mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
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:
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));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue