mirror of https://github.com/vector-im/riot-web
fix closing modal when finished
parent
f89bbea3f1
commit
8b2dc22fe1
|
@ -656,6 +656,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
|
|
||||||
// Check if it's a traditional DM and create the room if required.
|
// Check if it's a traditional DM and create the room if required.
|
||||||
// TODO: [Canonical DMs] Remove this check and instead just create the multi-person DM
|
// TODO: [Canonical DMs] Remove this check and instead just create the multi-person DM
|
||||||
|
let abort = false;
|
||||||
try {
|
try {
|
||||||
const isSelf = targetIds.length === 1 && targetIds[0] === client.getUserId();
|
const isSelf = targetIds.length === 1 && targetIds[0] === client.getUserId();
|
||||||
if (targetIds.length === 1 && !isSelf) {
|
if (targetIds.length === 1 && !isSelf) {
|
||||||
|
@ -673,9 +674,10 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
await client.peekInRoom(roomId);
|
await client.peekInRoom(roomId);
|
||||||
const invitesState = await inviteMultipleToRoom(roomId, targetIds);
|
const invitesState = await inviteMultipleToRoom(roomId, targetIds);
|
||||||
|
|
||||||
if (!this._shouldAbortAfterInviteError(invitesState)) {
|
abort = this._shouldAbortAfterInviteError(invitesState);
|
||||||
this.props.onFinished();
|
}
|
||||||
}
|
if (!abort) {
|
||||||
|
this.props.onFinished();
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
Loading…
Reference in New Issue