Correct confirm prompt for disinvite

It should be 'disinvite' not 'kick', and probably doesn't really
need a reason.
pull/21833/head
David Baker 2017-03-27 16:53:00 +01:00
parent a8d85ca2ad
commit a3efa45795
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;