Merge pull request #3220 from matrix-org/travis/kick-reason
Don't show a reason if there's no reason for a kick/ban
This commit is contained in:
commit
3fcbd46939
1 changed files with 2 additions and 2 deletions
|
@ -305,7 +305,7 @@ module.exports = React.createClass({
|
||||||
const {memberName, reason} = this._getKickOrBanInfo();
|
const {memberName, reason} = this._getKickOrBanInfo();
|
||||||
title = _t("You were kicked from %(roomName)s by %(memberName)s",
|
title = _t("You were kicked from %(roomName)s by %(memberName)s",
|
||||||
{memberName, roomName: this._roomName()});
|
{memberName, roomName: this._roomName()});
|
||||||
subTitle = _t("Reason: %(reason)s", {reason});
|
subTitle = reason ? _t("Reason: %(reason)s", {reason}) : null;
|
||||||
|
|
||||||
if (this._joinRule() === "invite") {
|
if (this._joinRule() === "invite") {
|
||||||
primaryActionLabel = _t("Forget this room");
|
primaryActionLabel = _t("Forget this room");
|
||||||
|
@ -322,7 +322,7 @@ module.exports = React.createClass({
|
||||||
const {memberName, reason} = this._getKickOrBanInfo();
|
const {memberName, reason} = this._getKickOrBanInfo();
|
||||||
title = _t("You were banned from %(roomName)s by %(memberName)s",
|
title = _t("You were banned from %(roomName)s by %(memberName)s",
|
||||||
{memberName, roomName: this._roomName()});
|
{memberName, roomName: this._roomName()});
|
||||||
subTitle = _t("Reason: %(reason)s", {reason});
|
subTitle = reason ? _t("Reason: %(reason)s", {reason}) : null;
|
||||||
primaryActionLabel = _t("Forget this room");
|
primaryActionLabel = _t("Forget this room");
|
||||||
primaryActionHandler = this.props.onForgetClick;
|
primaryActionHandler = this.props.onForgetClick;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue