From ac474f388439ec09cd4429e4ebba9b89365a2b79 Mon Sep 17 00:00:00 2001 From: mei23 Date: Sat, 25 Aug 2018 14:52:35 +0900 Subject: [PATCH] Send actor in Delete --- src/remote/activitypub/renderer/delete.ts | 6 +++++- src/services/note/delete.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/remote/activitypub/renderer/delete.ts b/src/remote/activitypub/renderer/delete.ts index f468a22e24..2a4e70e25e 100644 --- a/src/remote/activitypub/renderer/delete.ts +++ b/src/remote/activitypub/renderer/delete.ts @@ -1,4 +1,8 @@ -export default (object: any) => ({ +import config from '../../../config'; +import { ILocalUser } from "../../../models/user"; + +export default (object: any, user: ILocalUser) => ({ type: 'Delete', + actor: `${config.url}/users/${user._id}`, object }); diff --git a/src/services/note/delete.ts b/src/services/note/delete.ts index d444b13a8b..d0e2b12b41 100644 --- a/src/services/note/delete.ts +++ b/src/services/note/delete.ts @@ -32,7 +32,7 @@ export default async function(user: IUser, note: INote) { //#region ローカルの投稿なら削除アクティビティを配送 if (isLocalUser(user)) { - const content = pack(renderDelete(await renderNote(note))); + const content = pack(renderDelete(await renderNote(note), user)); const followings = await Following.find({ followeeId: user._id,