Skip to content

Commit

Permalink
call_hook can be http or ws
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Dec 19, 2023
1 parent ceec05f commit 37b4eb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const validateCallCreate = (opts) => {
assert.ok(call_status_hook || !call_hook, 'calls.create: call_status_hook is required when call_hook is used');

const hookUrl = typeof call_hook === 'object' ? call_hook.url : call_hook;
if (hookUrl) assert.ok(/^https?:/.test(hookUrl), 'call_hook must be an absolute url');
if (hookUrl) assert.ok(/^(http|ws)s?:/.test(hookUrl), 'call_hook must be an absolute url');
const hookStatusUrl = typeof call_status_hook === 'object' ? call_status_hook.url : call_status_hook;
if (hookStatusUrl) assert.ok(/^https?:/.test(hookStatusUrl), 'call_status_hook must be an absolute url');
};
Expand Down

0 comments on commit 37b4eb5

Please sign in to comment.