summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-06-17 14:12:50 +0900
committerGitHub <noreply@github.com>2018-06-17 14:12:50 +0900
commit4d90d554f832f7f13409f7e664683ab9a33548a0 (patch)
treeb54d36b7eecfde2c53d6b28344b0d54f31c61daf /src/remote
parentFiox bug (diff)
parentmaybe Support CW in ActivityPub (diff)
downloadsharkey-4d90d554f832f7f13409f7e664683ab9a33548a0.tar.gz
sharkey-4d90d554f832f7f13409f7e664683ab9a33548a0.tar.bz2
sharkey-4d90d554f832f7f13409f7e664683ab9a33548a0.zip
Merge pull request #1721 from rinsuki/activitypub/support-cw
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 06956fd23f..aba0dc809a 100644
--- a/src/remote/activitypub/renderer/note.ts
+++ b/src/remote/activitypub/renderer/note.ts
@@ -62,6 +62,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',