ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix publishedAt after a scheduled update
Chocobozzz77de223a5f5a
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.tsindex 760475af9b..fd2edfd170 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 {if (schedule.privacy) {const oldPrivacy = video.privacy+ const isNewVideo = oldPrivacy === VideoPrivacy.PRIVATEvideo.privacy = schedule.privacy- await video.save({ transaction: t })+ if (isNewVideo === true) video.publishedAt = new Date()- const isNewVideo = oldPrivacy === VideoPrivacy.PRIVATE+ await video.save({ transaction: t })await federateVideoIfNeeded(video, isNewVideo, t)}