mirror of
https://github.com/jambonz/jambonz-node.git
synced 2025-12-19 05:17:49 +00:00
add conf_hold_status to update call
This commit is contained in:
@@ -74,7 +74,7 @@ function validate(name, data) {
|
||||
* Validate the payload for an updateCall request
|
||||
*/
|
||||
const validateCallUpdate = (opts) => {
|
||||
const {call_hook, child_call_hook, call_status, listen_status, mute_status, whisper} = opts;
|
||||
const {call_hook, child_call_hook, call_status, listen_status, mute_status, whisper, conf_hold_status} = opts;
|
||||
|
||||
assert.ok(call_hook || child_call_hook || call_status || listen_status || mute_status || whisper,
|
||||
`calls.update: invalid request ${JSON.stringify(opts)}`);
|
||||
@@ -85,6 +85,9 @@ const validateCallUpdate = (opts) => {
|
||||
if (mute_status) assert.ok(['mute', 'unmute'].includes(mute_status),
|
||||
`invalid mute_status: ${mute_status}, must be 'mute' or 'unmute'`);
|
||||
|
||||
if (conf_hold_status) assert.ok(['hold', 'unhold'].includes(conf_hold_status),
|
||||
`invalid mute_status: ${mute_status}, must be 'mute' or 'unmute'`);
|
||||
|
||||
if (whisper) assert.ok(whisper.verb,
|
||||
`invalid whisper: ${JSON.stringify(whisper)}, must be a 'play' or 'say' verb`);
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jambonz/node-client",
|
||||
"version": "0.2.6",
|
||||
"version": "0.2.7",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user