1
0
forked from mirror/misskey
misskey/src/remote/activitypub/misc/get-note-html.ts
2018-11-04 15:17:52 +09:00

11 lines
286 B
TypeScript

import { INote } from '../../../models/note';
import toHtml from '../../../mfm/html';
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;
}