diff --git a/apps/web/src/components/views/dialogs/InviteDialog.tsx b/apps/web/src/components/views/dialogs/InviteDialog.tsx index be208b24a2..9817a12403 100644 --- a/apps/web/src/components/views/dialogs/InviteDialog.tsx +++ b/apps/web/src/components/views/dialogs/InviteDialog.tsx @@ -444,6 +444,21 @@ export default class InviteDialog extends React.PureComponent { + if (this.props.kind === InviteKind.Dm) { + await this.startDm(); + } else if (this.props.kind === InviteKind.Invite) { + await this.inviteUsers(); + } else { + throw new Error("Unknown InviteKind: " + this.props.kind); + } + } + private transferCall = async (): Promise => { if (this.props.kind !== InviteKind.CallTransfer) return; if (this.state.currentTabId == TabId.UserDirectory) { @@ -1129,8 +1144,6 @@ export default class InviteDialog extends React.PureComponent Promise) | null = null; - const identityServersEnabled = SettingsStore.getValue(UIFeature.IdentityServer); const cli = MatrixClientPeg.safeGet(); @@ -1167,7 +1180,6 @@ export default class InviteDialog extends React.PureComponent { + this.startDmOrSendInvites().catch((e) => logErrorAndShowErrorDialog("Error processing invites", e)); + }; + return (

{helpText}

@@ -1223,7 +1238,7 @@ export default class InviteDialog extends React.PureComponent