Only show the ask anyway modal for explicit user lookup failures
parent
fe71106b1b
commit
1f6f9ca983
|
@ -111,18 +111,11 @@ export default class MultiInviter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
|
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
|
||||||
try {
|
|
||||||
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
|
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
// noinspection ExceptionCaughtLocallyJS
|
// noinspection ExceptionCaughtLocallyJS
|
||||||
throw new Error("User has no profile");
|
throw new Error("User has no profile");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
throw {
|
|
||||||
errcode: "RIOT.USER_NOT_FOUND",
|
|
||||||
error: "User does not have a profile or does not exist."
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return MatrixClientPeg.get().invite(roomId, addr, undefined, this.reason);
|
return MatrixClientPeg.get().invite(roomId, addr, undefined, this.reason);
|
||||||
|
|
Loading…
Reference in New Issue