mirror of https://github.com/Chocobozzz/PeerTube
Fix privacy error on live update without privacy
parent
af8a47125f
commit
4662badde7
|
@ -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' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue