This commit is contained in:
ThatOneCalculator 2022-11-17 13:54:25 -08:00
parent d8ae9e7be6
commit 2c0cf33798
4 changed files with 5 additions and 0 deletions

View File

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

View File

@ -19,6 +19,7 @@ export const renderActivity = (x: any): IActivity | null => {
{
// as non-standards
manuallyApprovesFollowers: 'as:manuallyApprovesFollowers',
movedTo: 'as:movedTo',
sensitive: 'as:sensitive',
Hashtag: 'as:Hashtag',
quoteUrl: 'as:quoteUrl',

View File

@ -71,6 +71,7 @@ export async function renderPerson(user: ILocalUser) {
image: banner ? renderImage(banner) : null,
tag,
manuallyApprovesFollowers: user.isLocked,
movedTo: user.moved_to_account_id,
discoverable: !!user.isExplorable,
publicKey: renderKey(user, keypair, `#main-key`),
isCat: user.isCat,

View File

@ -156,6 +156,7 @@ export interface IActor extends IObject {
name?: string;
preferredUsername?: string;
manuallyApprovesFollowers?: boolean;
movedTo?: string;
discoverable?: boolean;
inbox: string;
sharedInbox?: string; // 後方互換性のため