Fix privacy error on live update without privacy

pull/6126/head
Chocobozzz 2023-12-15 15:51:59 +01:00
parent af8a47125f
commit 4662badde7
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ const videosUpdateValidator = getCommonVideoEditAttributes().concat([
if (!isValidPasswordProtectedPrivacy(req, res)) return cleanUpReqFiles(req) if (!isValidPasswordProtectedPrivacy(req, res)) return cleanUpReqFiles(req)
const video = getVideoWithAttributes(res) const video = getVideoWithAttributes(res)
if (video.isLive && video.privacy !== req.body.privacy && video.state !== VideoState.WAITING_FOR_LIVE) { if (exists(req.body.privacy) && video.isLive && video.privacy !== req.body.privacy && video.state !== VideoState.WAITING_FOR_LIVE) {
return res.fail({ message: 'Cannot update privacy of a live that has already started' }) return res.fail({ message: 'Cannot update privacy of a live that has already started' })
} }