* AP birthday, location * unset is null * isCatを検証対象に
This commit is contained in:
@@ -138,6 +138,8 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
||||
|
||||
const isBot = object.type === 'Service';
|
||||
|
||||
const bday = person['vcard:bday']?.match(/^\d{4}-\d{2}-\d{2}/);
|
||||
|
||||
// Create user
|
||||
let user: IRemoteUser;
|
||||
try {
|
||||
@@ -168,6 +170,8 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
||||
description: person.summary ? htmlToMfm(person.summary, person.tag) : null,
|
||||
url: getOneApHrefNullable(person.url),
|
||||
fields,
|
||||
birthday: bday ? bday[0] : null,
|
||||
location: person['vcard:Address'] || null,
|
||||
userHost: host
|
||||
}));
|
||||
|
||||
@@ -319,6 +323,8 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint
|
||||
|
||||
const tags = extractApHashtags(person.tag).map(tag => tag.toLowerCase()).splice(0, 32);
|
||||
|
||||
const bday = person['vcard:bday']?.match(/^\d{4}-\d{2}-\d{2}/);
|
||||
|
||||
const updates = {
|
||||
lastFetchedAt: new Date(),
|
||||
inbox: person.inbox,
|
||||
@@ -356,6 +362,8 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint
|
||||
url: getOneApHrefNullable(person.url),
|
||||
fields,
|
||||
description: person.summary ? htmlToMfm(person.summary, person.tag) : null,
|
||||
birthday: bday ? bday[0] : null,
|
||||
location: person['vcard:Address'] || null,
|
||||
});
|
||||
|
||||
// ハッシュタグ更新
|
||||
|
Reference in New Issue
Block a user