mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-17 18:32:20 +02:00
Only show the ask anyway modal for explicit user lookup failures
This commit is contained in:
parent
fe71106b1b
commit
1f6f9ca983
@ -111,17 +111,10 @@ export default class MultiInviter {
|
||||
}
|
||||
|
||||
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
|
||||
try {
|
||||
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
|
||||
if (!profile) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
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."
|
||||
};
|
||||
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
|
||||
if (!profile) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw new Error("User has no profile");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user