diff options
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r-- | server/lib/schedulers/update-videos-scheduler.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts index 21f071f9e..b7fb029f1 100644 --- a/server/lib/schedulers/update-videos-scheduler.ts +++ b/server/lib/schedulers/update-videos-scheduler.ts | |||
@@ -5,6 +5,7 @@ import { retryTransactionWrapper } from '../../helpers/database-utils' | |||
5 | import { federateVideoIfNeeded } from '../activitypub' | 5 | import { federateVideoIfNeeded } from '../activitypub' |
6 | import { SCHEDULER_INTERVALS_MS, sequelizeTypescript } from '../../initializers' | 6 | import { SCHEDULER_INTERVALS_MS, sequelizeTypescript } from '../../initializers' |
7 | import { VideoPrivacy } from '../../../shared/models/videos' | 7 | import { VideoPrivacy } from '../../../shared/models/videos' |
8 | import { Notifier } from '../notifier' | ||
8 | 9 | ||
9 | export class UpdateVideosScheduler extends AbstractScheduler { | 10 | export class UpdateVideosScheduler extends AbstractScheduler { |
10 | 11 | ||
@@ -39,6 +40,10 @@ export class UpdateVideosScheduler extends AbstractScheduler { | |||
39 | 40 | ||
40 | await video.save({ transaction: t }) | 41 | await video.save({ transaction: t }) |
41 | await federateVideoIfNeeded(video, isNewVideo, t) | 42 | await federateVideoIfNeeded(video, isNewVideo, t) |
43 | |||
44 | if (oldPrivacy === VideoPrivacy.UNLISTED || oldPrivacy === VideoPrivacy.PRIVATE) { | ||
45 | Notifier.Instance.notifyOnNewVideo(video) | ||
46 | } | ||
42 | } | 47 | } |
43 | 48 | ||
44 | await schedule.destroy({ transaction: t }) | 49 | await schedule.destroy({ transaction: t }) |