From e7c89cc3f3e69776c6ad62e62a52f8d2f12a81c1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 Apr 2023 09:57:37 +0200 Subject: Allow to update a live with untouched privacy --- server/middlewares/validators/videos/videos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares/validators/videos/videos.ts') diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index ea6bd0721..d3014e8e7 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts @@ -234,7 +234,7 @@ const videosUpdateValidator = getCommonVideoEditAttributes().concat([ if (!await doesVideoExist(req.params.id, res)) return cleanUpReqFiles(req) const video = getVideoWithAttributes(res) - if (req.body.privacy && video.isLive && video.state !== VideoState.WAITING_FOR_LIVE) { + if (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' }) } -- cgit v1.2.3