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:
+3
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user