aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r--server/lib/schedulers/update-videos-scheduler.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts
index 760475af9..fd2edfd17 100644
--- a/server/lib/schedulers/update-videos-scheduler.ts
+++ b/server/lib/schedulers/update-videos-scheduler.ts
@@ -43,11 +43,12 @@ export class UpdateVideosScheduler extends AbstractScheduler {
43 43
44 if (schedule.privacy) { 44 if (schedule.privacy) {
45 const oldPrivacy = video.privacy 45 const oldPrivacy = video.privacy
46 const isNewVideo = oldPrivacy === VideoPrivacy.PRIVATE
46 47
47 video.privacy = schedule.privacy 48 video.privacy = schedule.privacy
48 await video.save({ transaction: t }) 49 if (isNewVideo === true) video.publishedAt = new Date()
49 50
50 const isNewVideo = oldPrivacy === VideoPrivacy.PRIVATE 51 await video.save({ transaction: t })
51 await federateVideoIfNeeded(video, isNewVideo, t) 52 await federateVideoIfNeeded(video, isNewVideo, t)
52 } 53 }
53 54