From c3badc81fe3d78601fb278a7f28eeed63060d300 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 4 Jan 2018 16:56:36 +0100 Subject: Fix delete activities --- server/lib/activitypub/process/process-delete.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub/process/process-delete.ts') diff --git a/server/lib/activitypub/process/process-delete.ts b/server/lib/activitypub/process/process-delete.ts index 604570e74..01751422d 100644 --- a/server/lib/activitypub/process/process-delete.ts +++ b/server/lib/activitypub/process/process-delete.ts @@ -12,7 +12,7 @@ import { getOrCreateActorAndServerAndModel } from '../actor' async function processDeleteActivity (activity: ActivityDelete) { const actor = await getOrCreateActorAndServerAndModel(activity.actor) - if (actor.url === activity.id) { + if (actor.url === activity.object) { if (actor.type === 'Person') { if (!actor.Account) throw new Error('Actor ' + actor.url + ' is a person but we cannot find it in database.') @@ -25,14 +25,14 @@ async function processDeleteActivity (activity: ActivityDelete) { } { - const videoCommentInstance = await VideoCommentModel.loadByUrlAndPopulateAccount(activity.id) + const videoCommentInstance = await VideoCommentModel.loadByUrlAndPopulateAccount(activity.object) if (videoCommentInstance) { return processDeleteVideoComment(actor, videoCommentInstance) } } { - const videoInstance = await VideoModel.loadByUrlAndPopulateAccount(activity.id) + const videoInstance = await VideoModel.loadByUrlAndPopulateAccount(activity.object) if (videoInstance) { return processDeleteVideo(actor, videoInstance) } -- cgit v1.2.3