don't show re-join upon kicked when we know you can't

pull/21833/head
Bruno Windels 2019-04-16 17:23:45 +02:00
parent dbb73439e4
commit eeb9b4b2e3
1 changed files with 10 additions and 4 deletions

View File

@ -228,10 +228,16 @@ module.exports = React.createClass({
const {memberName, reason} = this._getKickOrBanInfo();
title = _t("You were kicked from this room by %(memberName)s", {memberName});
subTitle = _t("Reason: %(reason)s", {reason});
primaryActionLabel = _t("Re-join");
primaryActionHandler = this.props.onJoinClick;
secondaryActionLabel = _t("Forget this room");
secondaryActionHandler = this.props.onForgetClick;
if (this._joinRule() === "invite") {
primaryActionLabel = _t("Forget this room");
primaryActionHandler = this.props.onForgetClick;
} else {
primaryActionLabel = _t("Re-join");
primaryActionHandler = this.props.onJoinClick;
secondaryActionLabel = _t("Forget this room");
secondaryActionHandler = this.props.onForgetClick;
}
break;
}
case MessageCase.Banned: {