From 0bf68b6a9bcaed6a02caaa6bc3d95a772d18e9b3 Mon Sep 17 00:00:00 2001 From: Matt Hertogs Date: Fri, 9 Jan 2026 12:52:23 -0800 Subject: [PATCH] Fix: Allow media_path updates from REST API (#533) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/routes/api/accounts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/routes/api/accounts.js b/lib/routes/api/accounts.js index f3d02c6..418ce34 100644 --- a/lib/routes/api/accounts.js +++ b/lib/routes/api/accounts.js @@ -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) {