diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-21 08:57:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-21 08:57:00 +0200 |
commit | f92e7f76d43cbad173be87f47105b9a02032318a (patch) | |
tree | 2b18ff4d3cd863ff0f91adf7ca80fd7a2f5b3d05 /server/lib/activitypub/process | |
parent | 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (diff) | |
download | PeerTube-f92e7f76d43cbad173be87f47105b9a02032318a.tar.gz PeerTube-f92e7f76d43cbad173be87f47105b9a02032318a.tar.zst PeerTube-f92e7f76d43cbad173be87f47105b9a02032318a.zip |
Fix ownership change
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r-- | server/lib/activitypub/process/process-update.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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' | |||
15 | import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' | 15 | import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' |
16 | import { createOrUpdateVideoPlaylist } from '../playlist' | 16 | import { createOrUpdateVideoPlaylist } from '../playlist' |
17 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 17 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' |
18 | import { MActorSignature } from '../../../typings/models' | 18 | import { MActorSignature, MAccountIdActor } from '../../../typings/models' |
19 | 19 | ||
20 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { | 20 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { |
21 | const { activity, byActor } = options | 21 | const { activity, byActor } = options |
@@ -64,10 +64,13 @@ async function processUpdateVideo (actor: MActorSignature, activity: ActivityUpd | |||
64 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoObject.id, allowRefresh: false, fetchType: 'all' }) | 64 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoObject.id, allowRefresh: false, fetchType: 'all' }) |
65 | const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject) | 65 | const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject) |
66 | 66 | ||
67 | const account = actor.Account as MAccountIdActor | ||
68 | account.Actor = actor | ||
69 | |||
67 | const updateOptions = { | 70 | const updateOptions = { |
68 | video, | 71 | video, |
69 | videoObject, | 72 | videoObject, |
70 | account: channelActor.VideoChannel.Account, | 73 | account, |
71 | channel: channelActor.VideoChannel, | 74 | channel: channelActor.VideoChannel, |
72 | overrideTo: activity.to | 75 | overrideTo: activity.to |
73 | } | 76 | } |