Correctly handle optional replay setting

pull/5949/head
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
1 changed files with 1 additions and 1 deletions

View File

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