This commit is contained in:
ThatOneCalculator 2022-12-04 17:24:27 -08:00
parent 7ff11d0b52
commit 83f56e4543

View file

@ -1,16 +1,16 @@
import { URL } from 'node:url';
import * as mfm from 'mfm-js';
import renderImage from './image.js';
import renderKey from './key.js';
import config from '@/config/index.js';
import { ILocalUser } from '@/models/entities/user.js';
import { toHtml } from '../../../mfm/to-html.js';
import { getEmojis } from './note.js';
import renderEmoji from './emoji.js';
import { IIdentifier } from '../models/identifier.js';
import renderHashtag from './hashtag.js';
import type { ILocalUser } from '@/models/entities/user.js';
import { DriveFiles, UserProfiles } from '@/models/index.js';
import { getUserKeypair } from '@/misc/keypair-store.js';
import { toHtml } from '../../../mfm/to-html.js';
import renderImage from './image.js';
import renderKey from './key.js';
import { getEmojis } from './note.js';
import renderEmoji from './emoji.js';
import renderHashtag from './hashtag.js';
import type { IIdentifier } from '../models/identifier.js';
export async function renderPerson(user: ILocalUser) {
const id = `${config.url}/users/${user.id}`;
@ -73,16 +73,16 @@ export async function renderPerson(user: ILocalUser) {
manuallyApprovesFollowers: user.isLocked,
movedToUri: user.movedToUri,
discoverable: !!user.isExplorable,
publicKey: renderKey(user, keypair, `#main-key`),
publicKey: renderKey(user, keypair, '#main-key'),
isCat: user.isCat,
attachment: attachment.length ? attachment : undefined,
} as any;
if (profile?.birthday) {
if (profile.birthday) {
person['vcard:bday'] = profile.birthday;
}
if (profile?.location) {
if (profile.location) {
person['vcard:Address'] = profile.location;
}