diff options
Diffstat (limited to 'server/lib/activitypub/send/send-update.ts')
-rw-r--r-- | server/lib/activitypub/send/send-update.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts index 305edf429..bcf6e1569 100644 --- a/server/lib/activitypub/send/send-update.ts +++ b/server/lib/activitypub/send/send-update.ts | |||
@@ -75,7 +75,13 @@ async function sendUpdateActor (accountOrChannel: MChannelDefault | MAccountDefa | |||
75 | async function sendUpdateCacheFile (byActor: MActorLight, redundancyModel: MVideoRedundancyVideo) { | 75 | async function sendUpdateCacheFile (byActor: MActorLight, redundancyModel: MVideoRedundancyVideo) { |
76 | logger.info('Creating job to update cache file %s.', redundancyModel.url) | 76 | logger.info('Creating job to update cache file %s.', redundancyModel.url) |
77 | 77 | ||
78 | const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(redundancyModel.getVideo().id) | 78 | const associatedVideo = redundancyModel.getVideo() |
79 | if (!associatedVideo) { | ||
80 | logger.warn('Cannot send update activity for redundancy %s: no video files associated.', redundancyModel.url) | ||
81 | return | ||
82 | } | ||
83 | |||
84 | const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(associatedVideo.id) | ||
79 | 85 | ||
80 | const activityBuilder = (audience: ActivityAudience) => { | 86 | const activityBuilder = (audience: ActivityAudience) => { |
81 | const redundancyObject = redundancyModel.toActivityPubObject() | 87 | const redundancyObject = redundancyModel.toActivityPubObject() |