Skip to content

Commit

Permalink
Merge pull request #8 from jambonz/fix/create_call_hook
Browse files Browse the repository at this point in the history
call_hook can be http or ws
  • Loading branch information
davehorton authored Dec 19, 2023
2 parents ceec05f + 37b4eb5 commit 2689f9b
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 2689f9b

Please sign in to comment.