summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2018-06-17 14:11:31 +0900
committerrinsuki <428rinsuki+git@gmail.com>2018-06-17 14:11:31 +0900
commite5468713acfad73dbd8043a2a4afc8178aa45b97 (patch)
tree8528ac6fc351517c506ba3d0e9e809c28145fd25 /src/remote
parentUpdate deliver.ts (diff)
downloadsharkey-e5468713acfad73dbd8043a2a4afc8178aa45b97.tar.gz
sharkey-e5468713acfad73dbd8043a2a4afc8178aa45b97.tar.bz2
sharkey-e5468713acfad73dbd8043a2a4afc8178aa45b97.zip
maybe Support CW in ActivityPub
Diffstat (limited to 'src/remote')
-rw-r--r--src/remote/activitypub/models/note.ts1
-rw-r--r--src/remote/activitypub/renderer/note.ts1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts
index 91e700ef6f..974fce433b 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 a05c12b388..4c531da970 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',