From 0e2bb5bddc43e088112ef2b35ec087e3c62cabe7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 18 Apr 2018 14:48:40 +0900 Subject: [PATCH] Fix #1473 --- src/remote/activitypub/models/note.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index b2b5077c5..c94724366 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -75,7 +75,9 @@ export async function createNote(value: any, resolver?: Resolver, silent = false // リプライ const reply = note.inReplyTo ? await resolveNote(note.inReplyTo, resolver) : null; - const { window } = new JSDOM(note.content); + // MastodonはHTMLを送り付けてくる + // そして改行は
で表現されている + const { window } = new JSDOM(note.content.replace(/
/g, '\n')); // ユーザーの情報が古かったらついでに更新しておく if (actor.updatedAt == null || Date.now() - actor.updatedAt.getTime() > 1000 * 60 * 60 * 24) {