yumechi-no-kuni/src/remote/activitypub/misc/get-note-html.ts

11 lines
278 B
TypeScript
Raw Normal View History

2018-06-18 00:28:43 -05:00
import { INote } from '../../../models/note';
import toHtml from '../../../mfm/html';
import parse from '../../../mfm/parse';
2018-04-21 20:44:17 -05:00
export default function(note: INote) {
2018-06-17 01:58:23 -05:00
let html = toHtml(parse(note.text), note.mentionedRemoteUsers);
2018-09-08 12:59:14 -05:00
if (html == null) html = '';
2018-04-21 20:44:17 -05:00
return html;
}