summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2018-12-01 07:15:10 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-12-01 07:15:10 +0900
commitf2b1cf92e1ab683c680d5da4ccd55733d8feff56 (patch)
tree1889f8cd5703fdab180766738bdd8c71e6be8294 /src/remote/activitypub/renderer
parentUse for-of instead of map (diff)
downloadsharkey-f2b1cf92e1ab683c680d5da4ccd55733d8feff56.tar.gz
sharkey-f2b1cf92e1ab683c680d5da4ccd55733d8feff56.tar.bz2
sharkey-f2b1cf92e1ab683c680d5da4ccd55733d8feff56.zip
AP CW (#3448)
Diffstat (limited to 'src/remote/activitypub/renderer')
-rw-r--r--src/remote/activitypub/renderer/note.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index a854ad9f19..76a527e9aa 100644
--- a/src/remote/activitypub/renderer/note.ts
+++ b/src/remote/activitypub/renderer/note.ts
@@ -106,6 +106,8 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
text += `\n\nRE: ${url}`;
}
+ const summary = note.cw === '' ? String.fromCharCode(0x200B) : note.cw;
+
const content = toHtml(Object.assign({}, note, { text }));
const emojis = await getEmojis(note.emojis);
@@ -121,7 +123,7 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
id: `${config.url}/notes/${note._id}`,
type: 'Note',
attributedTo,
- summary: note.cw,
+ summary,
content,
_misskey_content: text,
_misskey_quote: quote,