Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3220 from matrix-org/travis/kick-reason
Browse files Browse the repository at this point in the history
Don't show a reason if there's no reason for a kick/ban
  • Loading branch information
turt2live authored Jul 15, 2019
2 parents 141352b + 31339aa commit 3fcbd46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/views/rooms/RoomPreviewBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ module.exports = React.createClass({
const {memberName, reason} = this._getKickOrBanInfo();
title = _t("You were kicked from %(roomName)s by %(memberName)s",
{memberName, roomName: this._roomName()});
subTitle = _t("Reason: %(reason)s", {reason});
subTitle = reason ? _t("Reason: %(reason)s", {reason}) : null;

if (this._joinRule() === "invite") {
primaryActionLabel = _t("Forget this room");
Expand All @@ -322,7 +322,7 @@ module.exports = React.createClass({
const {memberName, reason} = this._getKickOrBanInfo();
title = _t("You were banned from %(roomName)s by %(memberName)s",
{memberName, roomName: this._roomName()});
subTitle = _t("Reason: %(reason)s", {reason});
subTitle = reason ? _t("Reason: %(reason)s", {reason}) : null;
primaryActionLabel = _t("Forget this room");
primaryActionHandler = this.props.onForgetClick;
break;
Expand Down

0 comments on commit 3fcbd46

Please sign in to comment.