refactor: ♻️ Use vcard:Gender for vCard

https://datatracker.ietf.org/doc/html/rfc6350#section-6.2.7
This commit is contained in:
ThatOneCalculator 2022-05-23 19:03:29 -07:00
parent 446ab176ac
commit 82eb927dd4
3 changed files with 4 additions and 4 deletions

View file

@ -192,7 +192,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
description: person.summary ? htmlToMfm(truncate(person.summary, summaryLength), person.tag) : null,
url: getOneApHrefNullable(person.url),
fields,
pronouns: person['vcard:Pronouns'] || null,
pronouns: person['vcard:Gender'] || null,
birthday: bday ? bday[0] : null,
location: person['vcard:Address'] || null,
userHost: host,
@ -369,7 +369,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint
url: getOneApHrefNullable(person.url),
fields,
description: person.summary ? htmlToMfm(truncate(person.summary, summaryLength), person.tag) : null,
pronouns: person['vcard:Pronouns'] || null,
pronouns: person['vcard:Gender'] || null,
birthday: bday ? bday[0] : null,
location: person['vcard:Address'] || null,
});

View file

@ -78,7 +78,7 @@ export async function renderPerson(user: ILocalUser) {
} as any;
if (profile?.pronouns) {
person['vcard:Pronouns'] = profile.pronouns;
person['vcard:Gender'] = profile.pronouns;
}
if (profile?.birthday) {

View file

@ -164,7 +164,7 @@ export interface IActor extends IObject {
endpoints?: {
sharedInbox?: string;
};
'vcard:Pronouns'?: string;
'vcard:Gender'?: string;
'vcard:bday'?: string;
'vcard:Address'?: string;
}