-import { TagModel } from '../../../models/video/tag'
-import { VideoModel } from '../../../models/video/video'
-import { VideoFileModel } from '../../../models/video/video-file'
-import { getOrCreateActorAndServerAndModel } from '../actor'
-import { videoActivityObjectToDBAttributes, videoFileActivityUrlToDBAttributes } from './misc'
+import { VideoChannelModel } from '../../../models/video/video-channel'
+import { getAvatarInfoIfExists, updateActorAvatarInstance, updateActorInstance } from '../actor'
+import { getOrCreateVideoAndAccountAndChannel, getOrCreateVideoChannelFromVideoObject, updateVideoFromAP } from '../videos'
+import { sanitizeAndCheckVideoTorrentObject } from '../../../helpers/custom-validators/activitypub/videos'
+import { isCacheFileObjectValid } from '../../../helpers/custom-validators/activitypub/cache-file'
+import { createOrUpdateCacheFile } from '../cache-file'
+import { forwardVideoRelatedActivity } from '../send/utils'
+import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object'
+import { createOrUpdateVideoPlaylist } from '../playlist'
+import { APProcessorOptions } from '../../../types/activitypub-processor.model'
+import { MActorSignature, MAccountIdActor } from '../../../types/models'
+import { isRedundancyAccepted } from '@server/lib/redundancy'
+
+async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) {
+ const { activity, byActor } = options
+
+ const objectType = activity.object.type
+
+ if (objectType === 'Video') {
+ return retryTransactionWrapper(processUpdateVideo, byActor, activity)
+ }
+
+ if (objectType === 'Person' || objectType === 'Application' || objectType === 'Group') {
+ // We need more attributes
+ const byActorFull = await ActorModel.loadByUrlAndPopulateAccountAndChannel(byActor.url)
+ return retryTransactionWrapper(processUpdateActor, byActorFull, activity)
+ }