diff options
Diffstat (limited to 'server/lib/activitypub/process/process-update.ts')
-rw-r--r-- | server/lib/activitypub/process/process-update.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 6cd9d0fba..de1ff5d90 100644 --- a/server/lib/activitypub/process/process-update.ts +++ b/server/lib/activitypub/process/process-update.ts | |||
@@ -17,7 +17,7 @@ import { getImageInfoIfExists, updateActorImageInstance, updateActorInstance } f | |||
17 | import { createOrUpdateCacheFile } from '../cache-file' | 17 | import { createOrUpdateCacheFile } from '../cache-file' |
18 | import { createOrUpdateVideoPlaylist } from '../playlist' | 18 | import { createOrUpdateVideoPlaylist } from '../playlist' |
19 | import { forwardVideoRelatedActivity } from '../send/utils' | 19 | import { forwardVideoRelatedActivity } from '../send/utils' |
20 | import { getOrCreateVideoAndAccountAndChannel, getOrCreateVideoChannelFromVideoObject, updateVideoFromAP } from '../videos' | 20 | import { getOrCreateVideoAndAccountAndChannel, getOrCreateVideoChannelFromVideoObject, APVideoUpdater } from '../videos' |
21 | 21 | ||
22 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { | 22 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { |
23 | const { activity, byActor } = options | 23 | const { activity, byActor } = options |
@@ -77,14 +77,13 @@ async function processUpdateVideo (actor: MActorSignature, activity: ActivityUpd | |||
77 | const account = actor.Account as MAccountIdActor | 77 | const account = actor.Account as MAccountIdActor |
78 | account.Actor = actor | 78 | account.Actor = actor |
79 | 79 | ||
80 | const updateOptions = { | 80 | const updater = new APVideoUpdater({ |
81 | video, | 81 | video, |
82 | videoObject, | 82 | videoObject, |
83 | account, | ||
84 | channel: channelActor.VideoChannel, | 83 | channel: channelActor.VideoChannel, |
85 | overrideTo: activity.to | 84 | overrideTo: activity.to |
86 | } | 85 | }) |
87 | return updateVideoFromAP(updateOptions) | 86 | return updater.update() |
88 | } | 87 | } |
89 | 88 | ||
90 | async function processUpdateCacheFile (byActor: MActorSignature, activity: ActivityUpdate) { | 89 | async function processUpdateCacheFile (byActor: MActorSignature, activity: ActivityUpdate) { |