From d70e27a8654f3652972c8295e202e8d37c8131fd Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 17 Aug 2018 02:37:20 +0900 Subject: [PATCH] Provide id in announce activity --- src/remote/activitypub/renderer/announce.ts | 3 ++- src/services/note/create.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/remote/activitypub/renderer/announce.ts b/src/remote/activitypub/renderer/announce.ts index 8c3ff9f113..7a3f886447 100644 --- a/src/remote/activitypub/renderer/announce.ts +++ b/src/remote/activitypub/renderer/announce.ts @@ -1,4 +1,5 @@ -export default (object: any) => ({ +export default (id: string, object: any) => ({ type: 'Announce', + id, object }); diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 3745450e15..d11a02ada6 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -235,7 +235,7 @@ export default async (user: IUser, data: Option, silent = false) => new Promise< async function renderActivity(data: Option, note: INote) { const content = data.renote && data.text == null - ? renderAnnounce(data.renote.uri ? data.renote.uri : await renderNote(data.renote)) + ? renderAnnounce(note._id.toHexString(), data.renote.uri ? data.renote.uri : await renderNote(data.renote)) : renderCreate(await renderNote(note)); return packAp(content);