Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1f6f9ca

Browse files
committed
Only show the ask anyway modal for explicit user lookup failures
1 parent fe71106 commit 1f6f9ca

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/utils/MultiInviter.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,10 @@ export default class MultiInviter {
111111
}
112112

113113
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
114-
try {
115-
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
116-
if (!profile) {
117-
// noinspection ExceptionCaughtLocallyJS
118-
throw new Error("User has no profile");
119-
}
120-
} catch (e) {
121-
throw {
122-
errcode: "RIOT.USER_NOT_FOUND",
123-
error: "User does not have a profile or does not exist."
124-
};
114+
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
115+
if (!profile) {
116+
// noinspection ExceptionCaughtLocallyJS
117+
throw new Error("User has no profile");
125118
}
126119
}
127120

0 commit comments

Comments
 (0)