update person model

This commit is contained in:
cutestnekoaqua 2022-12-06 23:49:21 +01:00
parent ee78b0f115
commit 795a5f0760
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -156,7 +156,7 @@ export interface IActor extends IObject {
name?: string; name?: string;
preferredUsername?: string; preferredUsername?: string;
manuallyApprovesFollowers?: boolean; manuallyApprovesFollowers?: boolean;
movedToUri?: string; movedTo?: string;
alsoKnownAs?: string[]; alsoKnownAs?: string[];
discoverable?: boolean; discoverable?: boolean;
inbox: string; inbox: string;