Fix: Allow media_path updates from REST API (#533)

Added media_path to the list of allowed properties for call updates via REST API.
Includes validation to ensure media_path values are one of: no-media, partial-media, or full-media.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt Hertogs
2026-01-09 12:52:23 -08:00
committed by GitHub
parent 69046ab5d2
commit 0bf68b6a9b

View File

@@ -308,7 +308,8 @@ function validateUpdateCall(opts) {
'dtmf',
'conferenceParticipantAction',
'dub',
'boostAudioSignal'
'boostAudioSignal',
'media_path'
]
.reduce((acc, prop) => (opts[prop] ? ++acc : acc), 0);
@@ -372,6 +373,9 @@ function validateUpdateCall(opts) {
throw new DbErrorBadRequest('conferenceParticipantAction requires tag property when action is \'coach\'');
}
}
if (opts.media_path && !['no-media', 'partial-media', 'full-media'].includes(opts.media_path)) {
throw new DbErrorBadRequest('invalid media_path');
}
}
function validateTo(to) {