Merge pull request #772 from matrix-org/dbkr/disinvite_is_not_kick

Correct confirm prompt for disinvite
pull/21833/head
David Baker 2017-03-27 17:42:39 +01:00 committed by GitHub
commit a38a954fb5
1 changed files with 4 additions and 2 deletions

View File

@ -218,11 +218,13 @@ module.exports = WithMatrixClient(React.createClass({
},
onKick: function() {
const membership = this.props.member.membership;
const kickLabel = membership === "invite" ? "Disinvite" : "Kick";
const ConfirmUserActionDialog = sdk.getComponent("dialogs.ConfirmUserActionDialog");
Modal.createDialog(ConfirmUserActionDialog, {
member: this.props.member,
action: 'Kick',
askReason: true,
action: kickLabel,
askReason: membership == "join",
danger: true,
onFinished: (proceed, reason) => {
if (!proceed) return;