fix (backend): movedToUri should be either User or null

Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
atsu1125 2024-03-06 07:21:27 +09:00 committed by naskya
parent cd48818753
commit aaa0b7edde
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -494,9 +494,7 @@ export const UserRepository = db.getRepository(User).extend({
url: profile!.url, url: profile!.url,
uri: user.uri, uri: user.uri,
movedToUri: user.movedToUri movedToUri: user.movedToUri
? await this.userFromURI(user.movedToUri).catch( ? await this.userFromURI(user.movedToUri).catch(() => null)
() => user.movedToUri,
)
: null, : null,
alsoKnownAs: user.alsoKnownAs, alsoKnownAs: user.alsoKnownAs,
createdAt: user.createdAt.toISOString(), createdAt: user.createdAt.toISOString(),