X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fprocess%2Fprocess-update.ts;h=9f80a0ce9cb95219637d435b6caf4666b10d3bee;hb=453e83ea5d81d203ba34bc43cd5c2c750ba40568;hp=414f9e375762d81c0b0185b8e79924a7b6a28102;hpb=557b13ae24019d9ab214bbea7eaa0f892c8f4b05;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 414f9e375..9f80a0ce9 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 { SignatureActorModel } from '../../../typings/models' +import { MActorSignature } from '../../../typings/models' async function processUpdateActivity (options: APProcessorOptions) { const { activity, byActor } = options @@ -53,7 +53,7 @@ export { // --------------------------------------------------------------------------- -async function processUpdateVideo (actor: SignatureActorModel, activity: ActivityUpdate) { +async function processUpdateVideo (actor: MActorSignature, activity: ActivityUpdate) { const videoObject = activity.object as VideoTorrentObject if (sanitizeAndCheckVideoTorrentObject(videoObject) === false) { @@ -61,20 +61,20 @@ async function processUpdateVideo (actor: SignatureActorModel, activity: Activit return undefined } - const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoObject.id, allowRefresh: false }) + const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoObject.id, allowRefresh: false, fetchType: 'all' }) const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject) const updateOptions = { video, videoObject, - account: actor.Account, + account: channelActor.VideoChannel.Account, channel: channelActor.VideoChannel, overrideTo: activity.to } return updateVideoFromAP(updateOptions) } -async function processUpdateCacheFile (byActor: SignatureActorModel, activity: ActivityUpdate) { +async function processUpdateCacheFile (byActor: MActorSignature, activity: ActivityUpdate) { const cacheFileObject = activity.object as CacheFileObject if (!isCacheFileObjectValid(cacheFileObject)) { @@ -150,7 +150,7 @@ async function processUpdateActor (actor: ActorModel, activity: ActivityUpdate) } } -async function processUpdatePlaylist (byActor: SignatureActorModel, activity: ActivityUpdate) { +async function processUpdatePlaylist (byActor: MActorSignature, activity: ActivityUpdate) { const playlistObject = activity.object as PlaylistObject const byAccount = byActor.Account