fixes
This commit is contained in:
parent
7ff11d0b52
commit
83f56e4543
|
@ -1,16 +1,16 @@
|
||||||
import { URL } from 'node:url';
|
import { URL } from 'node:url';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import renderImage from './image.js';
|
|
||||||
import renderKey from './key.js';
|
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index.js';
|
||||||
import { ILocalUser } from '@/models/entities/user.js';
|
import type { 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 { DriveFiles, UserProfiles } from '@/models/index.js';
|
import { DriveFiles, UserProfiles } from '@/models/index.js';
|
||||||
import { getUserKeypair } from '@/misc/keypair-store.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) {
|
export async function renderPerson(user: ILocalUser) {
|
||||||
const id = `${config.url}/users/${user.id}`;
|
const id = `${config.url}/users/${user.id}`;
|
||||||
|
@ -73,16 +73,16 @@ export async function renderPerson(user: ILocalUser) {
|
||||||
manuallyApprovesFollowers: user.isLocked,
|
manuallyApprovesFollowers: user.isLocked,
|
||||||
movedToUri: user.movedToUri,
|
movedToUri: user.movedToUri,
|
||||||
discoverable: !!user.isExplorable,
|
discoverable: !!user.isExplorable,
|
||||||
publicKey: renderKey(user, keypair, `#main-key`),
|
publicKey: renderKey(user, keypair, '#main-key'),
|
||||||
isCat: user.isCat,
|
isCat: user.isCat,
|
||||||
attachment: attachment.length ? attachment : undefined,
|
attachment: attachment.length ? attachment : undefined,
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
if (profile?.birthday) {
|
if (profile.birthday) {
|
||||||
person['vcard:bday'] = profile.birthday;
|
person['vcard:bday'] = profile.birthday;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile?.location) {
|
if (profile.location) {
|
||||||
person['vcard:Address'] = profile.location;
|
person['vcard:Address'] = profile.location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue