From f92e7f76d43cbad173be87f47105b9a02032318a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 21 Aug 2019 08:57:00 +0200 Subject: Fix ownership change --- server/lib/activitypub/process/process-update.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server/lib/activitypub/process') diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 9f80a0ce9..a47d605d8 100644 --- a/server/lib/activitypub/process/process-update.ts +++ b/server/lib/activitypub/process/process-update.ts @@ -15,7 +15,7 @@ import { forwardVideoRelatedActivity } from '../send/utils' import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' import { createOrUpdateVideoPlaylist } from '../playlist' import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature } from '../../../typings/models' +import { MActorSignature, MAccountIdActor } from '../../../typings/models' async function processUpdateActivity (options: APProcessorOptions) { const { activity, byActor } = options @@ -64,10 +64,13 @@ async function processUpdateVideo (actor: MActorSignature, activity: ActivityUpd const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoObject.id, allowRefresh: false, fetchType: 'all' }) const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject) + const account = actor.Account as MAccountIdActor + account.Actor = actor + const updateOptions = { video, videoObject, - account: channelActor.VideoChannel.Account, + account, channel: channelActor.VideoChannel, overrideTo: activity.to } -- cgit v1.2.3