Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix live replay setting breaking change

Chocobozzz90b84bd4bbba
diff --git a/server/server/controllers/api/videos/live.ts b/server/server/controllers/api/videos/live.ts
index 84cb3d51b4..dc2f80aff6 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) {
if (videoLive.saveReplay) {
const replaySettings = new VideoLiveReplaySettingModel({
- privacy: videoInfo.replaySettings.privacy
+ privacy: videoInfo.replaySettings.privacy || videoCreated.privacy
})
await replaySettings.save(sequelizeOptions)
diff --git a/server/server/middlewares/validators/videos/video-live.ts b/server/server/middlewares/validators/videos/video-live.ts
index 097da079d1..74ebe51ff1 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([
})
}
- if (body.saveReplay && !body.replaySettings?.privacy) {
- cleanUpReqFiles(req)
-
- return res.fail({
- status: HttpStatusCode.BAD_REQUEST_400,
- message: 'Live replay is enabled but privacy replay setting is missing'
- })
- }
-
const user = res.locals.oauth.token.User
if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)