Fix typing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
004d954a5b
commit
209c350132
3 changed files with 37 additions and 27 deletions
|
@ -400,14 +400,16 @@ export const Commands = [
|
|||
// If we need an identity server but don't have one, things
|
||||
// get a bit more complex here, but we try to show something
|
||||
// meaningful.
|
||||
let finished = Promise.resolve();
|
||||
let prom = Promise.resolve();
|
||||
if (
|
||||
getAddressType(address) === 'email' &&
|
||||
!MatrixClientPeg.get().getIdentityServerUrl()
|
||||
) {
|
||||
const defaultIdentityServerUrl = getDefaultIdentityServerUrl();
|
||||
if (defaultIdentityServerUrl) {
|
||||
({ finished } = Modal.createTrackedDialog('Slash Commands', 'Identity server',
|
||||
const { finished } = Modal.createTrackedDialog<[boolean]>(
|
||||
'Slash Commands',
|
||||
'Identity server',
|
||||
QuestionDialog, {
|
||||
title: _t("Use an identity server"),
|
||||
description: <p>{_t(
|
||||
|
@ -420,9 +422,9 @@ export const Commands = [
|
|||
)}</p>,
|
||||
button: _t("Continue"),
|
||||
},
|
||||
));
|
||||
);
|
||||
|
||||
finished = finished.then(([useDefault]: any) => {
|
||||
prom = finished.then(([useDefault]) => {
|
||||
if (useDefault) {
|
||||
useDefaultIdentityServer();
|
||||
return;
|
||||
|
@ -434,7 +436,7 @@ export const Commands = [
|
|||
}
|
||||
}
|
||||
const inviter = new MultiInviter(roomId);
|
||||
return success(finished.then(() => {
|
||||
return success(prom.then(() => {
|
||||
return inviter.invite([address]);
|
||||
}).then(() => {
|
||||
if (inviter.getCompletionState(address) !== "invited") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue