* AP birthday, location * unset is null * isCatを検証対象に
This commit is contained in:
parent
dc8eb7d4fe
commit
23e2a870cc
4 changed files with 25 additions and 2 deletions
|
@ -52,7 +52,7 @@ export async function renderPerson(user: ILocalUser) {
|
|||
|
||||
const keypair = await UserKeypairs.findOne(user.id).then(ensure);
|
||||
|
||||
return {
|
||||
const person = {
|
||||
type: isSystem ? 'Application' : user.isBot ? 'Service' : 'Person',
|
||||
id,
|
||||
inbox: `${id}/inbox`,
|
||||
|
@ -73,5 +73,15 @@ export async function renderPerson(user: ILocalUser) {
|
|||
publicKey: renderKey(user, keypair, `#main-key`),
|
||||
isCat: user.isCat,
|
||||
attachment: attachment.length ? attachment : undefined
|
||||
};
|
||||
} as any;
|
||||
|
||||
if (profile?.birthday) {
|
||||
person['vcard:bday'] = profile.birthday;
|
||||
}
|
||||
|
||||
if (profile?.location) {
|
||||
person['vcard:Address'] = profile.location;
|
||||
}
|
||||
|
||||
return person;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue