mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Merge pull request #4328 from matrix-org/t3chguy/slashcommands
fix /invite Slash Command
This commit is contained in:
commit
138d280e4e
1 changed files with 9 additions and 6 deletions
|
@ -412,17 +412,20 @@ export const Commands = [
|
|||
button: _t("Continue"),
|
||||
},
|
||||
));
|
||||
|
||||
finished = finished.then(([useDefault]: any) => {
|
||||
if (useDefault) {
|
||||
useDefaultIdentityServer();
|
||||
return;
|
||||
}
|
||||
throw new Error(_t("Use an identity server to invite by email. Manage in Settings."));
|
||||
});
|
||||
} else {
|
||||
return reject(_t("Use an identity server to invite by email. Manage in Settings."));
|
||||
}
|
||||
}
|
||||
const inviter = new MultiInviter(roomId);
|
||||
return success(finished.then(([useDefault]: any) => {
|
||||
if (useDefault) {
|
||||
useDefaultIdentityServer();
|
||||
} else if (useDefault === false) {
|
||||
throw new Error(_t("Use an identity server to invite by email. Manage in Settings."));
|
||||
}
|
||||
return success(finished.then(() => {
|
||||
return inviter.invite([address]);
|
||||
}).then(() => {
|
||||
if (inviter.getCompletionState(address) !== "invited") {
|
||||
|
|
Loading…
Reference in a new issue