From e5468713acfad73dbd8043a2a4afc8178aa45b97 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Sun, 17 Jun 2018 14:11:31 +0900 Subject: [PATCH] maybe Support CW in ActivityPub --- src/remote/activitypub/models/note.ts | 1 + src/remote/activitypub/renderer/note.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 91e700ef6..974fce433 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -170,6 +170,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false media, reply, renote: undefined, + cw: note.summary, text: text, viaMobile: false, geo: undefined, diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts index a05c12b38..4c531da97 100644 --- a/src/remote/activitypub/renderer/note.ts +++ b/src/remote/activitypub/renderer/note.ts @@ -49,6 +49,7 @@ export default async function renderNote(note: INote, dive = true) { id: `${config.url}/notes/${note._id}`, type: 'Note', attributedTo, + summary: note.cw, content: toHtml(note), published: note.createdAt.toISOString(), to: 'https://www.w3.org/ns/activitystreams#Public',