summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/misc/get-note-html.ts
blob: 6990a4ae5e9cfbd6aae5c8b70eb9d4da9d1ff0f1 (plain)
1
2
3
4
5
6
7
8
9
10
import { Note } from '../../../models/entities/note';
import { toHtml } from '../../../mfm/to-html';
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;
}