X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-update.ts;h=2b01ca5e7130ace36eeab61e49ef5d4817e9bc1f;hb=084a2cd0f6274afac0fbcd714e627273da1df25e;hp=9c76671b5d8b931bdbbeef4fe14f7cbcd06bf9a2;hpb=e612209767ebe1deb0af7688c96b7f979bb52b44;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts index 9c76671b5..2b01ca5e7 100644 --- a/server/lib/activitypub/send/send-update.ts +++ b/server/lib/activitypub/send/send-update.ts @@ -8,7 +8,6 @@ import { getUpdateActivityPubUrl } from '../url' import { broadcastToFollowers, sendVideoRelatedActivity } from './utils' import { audiencify, getActorsInvolvedInVideo, getAudience } from '../audience' import { logger } from '../../../helpers/logger' -import { VideoCaptionModel } from '../../../models/video/video-caption' import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' import { getServerActor } from '../../../helpers/utils' import { @@ -29,7 +28,7 @@ async function sendUpdateVideo (videoArg: MVideoAPWithoutCaption, t: Transaction logger.info('Creating job to update video %s.', video.url) - const byActor = overrodeByActor ? overrodeByActor : video.VideoChannel.Account.Actor + const byActor = overrodeByActor || video.VideoChannel.Account.Actor const url = getUpdateActivityPubUrl(video.url, video.updatedAt.toISOString()) @@ -85,7 +84,7 @@ async function sendUpdateCacheFile (byActor: MActorLight, redundancyModel: MVide return buildUpdateActivity(url, byActor, redundancyObject, audience) } - return sendVideoRelatedActivity(activityBuilder, { byActor, video }) + return sendVideoRelatedActivity(activityBuilder, { byActor, video, contextType: 'CacheFile' }) } async function sendUpdateVideoPlaylist (videoPlaylist: MVideoPlaylistFull, t: Transaction) {