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

Don't show a reason if there's no reason for a kick/ban #3220

Merged
merged 1 commit into from
Jul 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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