aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-08-18 10:49:33 +0200
committerChocobozzz <me@florianbigard.com>2023-08-18 10:49:33 +0200
commit90b84bd4bbba27944ad78765965ceae5a8f0e133 (patch)
tree0fad1f9e514769315547943697c8c345a28979cb /server
parent5f79f37d10d44ee0cff673bec4eff1b0db7f00f2 (diff)
downloadPeerTube-90b84bd4bbba27944ad78765965ceae5a8f0e133.tar.gz
PeerTube-90b84bd4bbba27944ad78765965ceae5a8f0e133.tar.zst
PeerTube-90b84bd4bbba27944ad78765965ceae5a8f0e133.zip
Fix live replay setting breaking change
Diffstat (limited to 'server')
-rw-r--r--server/server/controllers/api/videos/live.ts2
-rw-r--r--server/server/middlewares/validators/videos/video-live.ts9
2 files changed, 1 insertions, 10 deletions
diff --git a/server/server/controllers/api/videos/live.ts b/server/server/controllers/api/videos/live.ts
index 84cb3d51b..dc2f80aff 100644
--- a/server/server/controllers/api/videos/live.ts
+++ b/server/server/controllers/api/videos/live.ts
@@ -197,7 +197,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
197 197
198 if (videoLive.saveReplay) { 198 if (videoLive.saveReplay) {
199 const replaySettings = new VideoLiveReplaySettingModel({ 199 const replaySettings = new VideoLiveReplaySettingModel({
200 privacy: videoInfo.replaySettings.privacy 200 privacy: videoInfo.replaySettings.privacy || videoCreated.privacy
201 }) 201 })
202 await replaySettings.save(sequelizeOptions) 202 await replaySettings.save(sequelizeOptions)
203 203
diff --git a/server/server/middlewares/validators/videos/video-live.ts b/server/server/middlewares/validators/videos/video-live.ts
index 097da079d..74ebe51ff 100644
--- a/server/server/middlewares/validators/videos/video-live.ts
+++ b/server/server/middlewares/validators/videos/video-live.ts
@@ -122,15 +122,6 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([
122 }) 122 })
123 } 123 }
124 124
125 if (body.saveReplay && !body.replaySettings?.privacy) {
126 cleanUpReqFiles(req)
127
128 return res.fail({
129 status: HttpStatusCode.BAD_REQUEST_400,
130 message: 'Live replay is enabled but privacy replay setting is missing'
131 })
132 }
133
134 const user = res.locals.oauth.token.User 125 const user = res.locals.oauth.token.User
135 if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req) 126 if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)
136 127