refactor: ♻️ Use vcard:Gender for vCard
https://datatracker.ietf.org/doc/html/rfc6350#section-6.2.7
This commit is contained in:
parent
446ab176ac
commit
82eb927dd4
3 changed files with 4 additions and 4 deletions
|
@ -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,
|
description: person.summary ? htmlToMfm(truncate(person.summary, summaryLength), person.tag) : null,
|
||||||
url: getOneApHrefNullable(person.url),
|
url: getOneApHrefNullable(person.url),
|
||||||
fields,
|
fields,
|
||||||
pronouns: person['vcard:Pronouns'] || null,
|
pronouns: person['vcard:Gender'] || null,
|
||||||
birthday: bday ? bday[0] : null,
|
birthday: bday ? bday[0] : null,
|
||||||
location: person['vcard:Address'] || null,
|
location: person['vcard:Address'] || null,
|
||||||
userHost: host,
|
userHost: host,
|
||||||
|
@ -369,7 +369,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint
|
||||||
url: getOneApHrefNullable(person.url),
|
url: getOneApHrefNullable(person.url),
|
||||||
fields,
|
fields,
|
||||||
description: person.summary ? htmlToMfm(truncate(person.summary, summaryLength), person.tag) : null,
|
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,
|
birthday: bday ? bday[0] : null,
|
||||||
location: person['vcard:Address'] || null,
|
location: person['vcard:Address'] || null,
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,7 +78,7 @@ export async function renderPerson(user: ILocalUser) {
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
if (profile?.pronouns) {
|
if (profile?.pronouns) {
|
||||||
person['vcard:Pronouns'] = profile.pronouns;
|
person['vcard:Gender'] = profile.pronouns;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile?.birthday) {
|
if (profile?.birthday) {
|
||||||
|
|
|
@ -164,7 +164,7 @@ export interface IActor extends IObject {
|
||||||
endpoints?: {
|
endpoints?: {
|
||||||
sharedInbox?: string;
|
sharedInbox?: string;
|
||||||
};
|
};
|
||||||
'vcard:Pronouns'?: string;
|
'vcard:Gender'?: string;
|
||||||
'vcard:bday'?: string;
|
'vcard:bday'?: string;
|
||||||
'vcard:Address'?: string;
|
'vcard:Address'?: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue