define ap person create/update/render

This commit is contained in:
tamaina 2025-07-07 12:55:32 +09:00
parent dabdaf14d2
commit 91fca71a43
4 changed files with 5 additions and 0 deletions

View File

@ -577,6 +577,7 @@ export class ApRendererService {
publicKey: this.renderKey(user, keypair, '#main-key'),
isCat: user.isCat,
attachment: attachment.length ? attachment : undefined,
suspended: user.isSuspended,
};
if (user.movedToUri) {

View File

@ -543,6 +543,7 @@ const extension_context_definition = {
Emoji: 'toot:Emoji',
featured: 'toot:featured',
discoverable: 'toot:discoverable',
suspended: 'toot:suspended',
// schema
schema: 'http://schema.org#',
PropertyValue: 'schema:PropertyValue',

View File

@ -393,6 +393,7 @@ export class ApPersonService implements OnModuleInit {
makeNotesFollowersOnlyBefore: (person as any).makeNotesFollowersOnlyBefore ?? null,
makeNotesHiddenBefore: (person as any).makeNotesHiddenBefore ?? null,
emojis,
isRemoteSuspended: person.suspended === true,
})) as MiRemoteUser;
let _description: string | null = null;
@ -570,6 +571,7 @@ export class ApPersonService implements OnModuleInit {
movedToUri: person.movedTo ?? null,
alsoKnownAs: person.alsoKnownAs ?? null,
isExplorable: person.discoverable,
isRemoteSuspended: person.suspended === true,
...(await this.resolveAvatarAndBanner(exist, person.icon, person.image).catch(() => ({}))),
} as Partial<MiRemoteUser> & Pick<MiRemoteUser, 'isBot' | 'isCat' | 'isLocked' | 'movedToUri' | 'alsoKnownAs' | 'isExplorable'>;

View File

@ -195,6 +195,7 @@ export interface IActor extends IObject {
};
'vcard:bday'?: string;
'vcard:Address'?: string;
suspended?: boolean;
}
export const isCollection = (object: IObject): object is ICollection =>