summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/misc/get-note-html.ts
blob: dba915fee9cb3644e3c45209c7084ac8acbfbffa (plain)
1
2
3
4
5
6
7
8
9
10
import { Note } from '../../../models/entities/note';
import { toHtml } from '../../../mfm/toHtml';
import { parse } from '../../../mfm/parse';

export default function(note: Note) {
	let html = toHtml(parse(note.text), JSON.parse(note.mentionedRemoteUsers));
	if (html == null) html = '<p>.</p>';

	return html;
}