mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 21:08:52 -07:00
[mastodon-client] Fix resolving remote users that aren't yet in the database
This commit is contained in:
parent
947f5ba1e2
commit
ae91ffbb8a
1 changed files with 2 additions and 2 deletions
|
@ -65,8 +65,8 @@ export class SearchHelpers {
|
|||
if (!match) match = q.match(/^@(?<user>[a-zA-Z0-9_]+)$/)
|
||||
if (match) {
|
||||
// check if user is already in database
|
||||
const dbResult = await Users.findBy({usernameLower: match.groups!.user.toLowerCase(), host: match.groups?.host ?? IsNull()});
|
||||
if (dbResult) return dbResult;
|
||||
const dbResult = await Users.findOneBy({usernameLower: match.groups!.user.toLowerCase(), host: match.groups?.host ?? IsNull()});
|
||||
if (dbResult) return [dbResult];
|
||||
|
||||
const result = await resolveUser(match.groups!.user.toLowerCase(), match.groups?.host ?? null);
|
||||
if (result) return [result];
|
||||
|
|
Loading…
Reference in a new issue