1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

don't notify prior to scheduled update

also increase timeouts on user-notification test
This commit is contained in:
Josh Morel 2019-02-06 06:14:45 -05:00 committed by Chocobozzz
parent 552dd3306f
commit f7effe8dc7
2 changed files with 44 additions and 4 deletions

View file

@ -91,7 +91,8 @@ async function onVideoFileTranscoderOrImportSuccess (video: VideoModel) {
return { videoDatabase, videoPublished }
})
if (videoPublished) {
// don't notify prior to scheduled video update
if (videoPublished && !videoDatabase.ScheduleVideoUpdate) {
Notifier.Instance.notifyOnNewVideo(videoDatabase)
Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
}
@ -149,8 +150,11 @@ async function onVideoFileOptimizerSuccess (videoArg: VideoModel, isNewVideo: bo
return { videoDatabase, videoPublished }
})
if (isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
// don't notify prior to scheduled video update
if (!videoDatabase.ScheduleVideoUpdate) {
if (isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
}
}
// ---------------------------------------------------------------------------