misskey/src/remote/activitypub/misc/get-note-html.ts
2019-01-30 16:56:27 +09:00

10 lines
296 B
TypeScript

import { INote } from '../../../models/note';
import { toHtml } from '../../../mfm/toHtml';
import { parse } from '../../../mfm/parse';
export default function(note: INote) {
let html = toHtml(parse(note.text), note.mentionedRemoteUsers);
if (html == null) html = '<p>.</p>';
return html;
}