diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-18 14:48:40 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-18 14:48:40 +0900 |
| commit | 0e2bb5bddc43e088112ef2b35ec087e3c62cabe7 (patch) | |
| tree | 79b4debd615892e3328a04e91f1fbdfee3ae87b3 /src/remote/activitypub/models/note.ts | |
| parent | Update dependencies :rocket: (diff) | |
| download | sharkey-0e2bb5bddc43e088112ef2b35ec087e3c62cabe7.tar.gz sharkey-0e2bb5bddc43e088112ef2b35ec087e3c62cabe7.tar.bz2 sharkey-0e2bb5bddc43e088112ef2b35ec087e3c62cabe7.zip | |
Fix #1473
Diffstat (limited to 'src/remote/activitypub/models/note.ts')
| -rw-r--r-- | src/remote/activitypub/models/note.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index b2b5077c5e..c947243664 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を送り付けてくる + // そして改行は<br />で表現されている + const { window } = new JSDOM(note.content.replace(/<br \/>/g, '\n')); // ユーザーの情報が古かったらついでに更新しておく if (actor.updatedAt == null || Date.now() - actor.updatedAt.getTime() > 1000 * 60 * 60 * 24) { |