fix ap person to db model

fixed entries of movedToUri and added entries of alsoKnownAs
This commit is contained in:
cutestnekoaqua 2022-12-06 18:05:36 +01:00
parent 170957ef05
commit 2051bec543

View File

@ -172,7 +172,8 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
lastFetchedAt: new Date(),
name: truncate(person.name, nameLength),
isLocked: !!person.manuallyApprovesFollowers,
movedToUri: null,
movedToUri: person.movedToUri,
alsoKnownAs: person.alsoKnownAs,
isExplorable: !!person.discoverable,
username: person.preferredUsername,
usernameLower: person.preferredUsername!.toLowerCase(),
@ -345,6 +346,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint
isCat: (person as any).isCat === true,
isLocked: !!person.manuallyApprovesFollowers,
movedToUri: person.movedToUri,
alsoKnownAs: person.alsoKnownAs,
isExplorable: !!person.discoverable,
} as Partial<User>;