summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/misc
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-04-02 10:36:11 +0900
committerGitHub <noreply@github.com>2021-04-02 10:36:11 +0900
commit1f4ae2f63a609d51942daa23772439379496064e (patch)
tree55e67e216bd30b8a5c95f769e8696c4b885d1e61 /src/remote/activitypub/misc
parenttweak avatar generation (diff)
downloadsharkey-1f4ae2f63a609d51942daa23772439379496064e.tar.gz
sharkey-1f4ae2f63a609d51942daa23772439379496064e.tar.bz2
sharkey-1f4ae2f63a609d51942daa23772439379496064e.zip
Use mfm-js for MFM parsing (#7415)
* wip * Update mfm.ts * wip * update mfmjs * refactor * nanka * Update mfm.ts * Update to-html.ts * Update to-html.ts * wip * fix test * fix test
Diffstat (limited to 'src/remote/activitypub/misc')
-rw-r--r--src/remote/activitypub/misc/get-note-html.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote/activitypub/misc/get-note-html.ts b/src/remote/activitypub/misc/get-note-html.ts
index 6990a4ae5e..683860d9cc 100644
--- a/src/remote/activitypub/misc/get-note-html.ts
+++ b/src/remote/activitypub/misc/get-note-html.ts
@@ -1,9 +1,9 @@
+import * as mfm from 'mfm-js';
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));
+ let html = note.text ? toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers)) : null;
if (html == null) html = '<p>.</p>';
return html;