From ec6e4da8b3d39e886336a5f8f8152651e45c5ae9 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sat, 14 Jun 2025 19:58:32 -0400 Subject: [PATCH] parse plain Markdown as MFM before falling back to HTML from remote notes --- .../backend/src/core/activitypub/models/ApNoteService.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index d9950653fc..db26108fa2 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -210,7 +210,9 @@ export class ApNoteService { const cw = note.summary === '' ? null : note.summary; // テキストのパース - let text = getContentByType(note, 'text/x.misskeymarkdown'); + let text = + getContentByType(note, 'text/x.misskeymarkdown') ?? + getContentByType(note, 'text/markdown'); if (text == null && typeof note.content === 'string') { text = this.apMfmService.htmlToMfm(note.content, note.tag); } @@ -407,7 +409,9 @@ export class ApNoteService { const cw = note.summary === '' ? null : note.summary; // テキストのパース - let text = getContentByType(note, 'text/x.misskeymarkdown'); + let text = + getContentByType(note, 'text/x.misskeymarkdown') ?? + getContentByType(note, 'text/markdown'); if (text == null && typeof note.content === 'string') { text = this.apMfmService.htmlToMfm(note.content, note.tag); }