1
0
Fork 0

Fix privacy error on live update without privacy

This commit is contained in:
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

View file

@ -231,7 +231,7 @@ const videosUpdateValidator = getCommonVideoEditAttributes().concat([
if (!isValidPasswordProtectedPrivacy(req, res)) return cleanUpReqFiles(req)
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' })
}