Correctly handle optional replay setting

This commit is contained in:
Chocobozzz 2023-08-18 11:52:12 +02:00
parent 18570bee99
commit 64cb55fcb1
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -197,7 +197,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
if (videoLive.saveReplay) {
const replaySettings = new VideoLiveReplaySettingModel({
privacy: videoInfo.replaySettings.privacy || videoCreated.privacy
privacy: videoInfo.replaySettings?.privacy ?? videoCreated.privacy
})
await replaySettings.save(sequelizeOptions)