From 1015901a9dbc9fae6293869d4b58d6c488cd4f5a Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 13 Feb 2024 14:04:07 +0000 Subject: [PATCH] avoid parsing undefined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don't understand why upstream wouldn't have this same problem ☹ We already have this same conditional in `ApRenderService.renderNote` and `ApRenderService.renderUpNote`, and Misskey doesn't --- packages/backend/src/core/activitypub/ApMfmService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/activitypub/ApMfmService.ts b/packages/backend/src/core/activitypub/ApMfmService.ts index 0716e43123..88f0da281f 100644 --- a/packages/backend/src/core/activitypub/ApMfmService.ts +++ b/packages/backend/src/core/activitypub/ApMfmService.ts @@ -35,7 +35,7 @@ export class ApMfmService { noMisskeyContent = true; } - const content = this.mfmService.toHtml(parsed, JSON.parse(note.mentionedRemoteUsers)); + const content = this.mfmService.toHtml(parsed, note.mentionedRemoteUsers ? JSON.parse(note.mentionedRemoteUsers) : []); return { content,