From 37efdc62be8caae21b68f499f61535fa757e7a52 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Fri, 9 Dec 2022 11:07:41 -0500 Subject: [PATCH] fix prev commit --- lib/utils/ws-requestor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/ws-requestor.js b/lib/utils/ws-requestor.js index fba4761d..8e707da1 100644 --- a/lib/utils/ws-requestor.js +++ b/lib/utils/ws-requestor.js @@ -54,8 +54,8 @@ class WsRequestor extends BaseRequestor { /* if we have an absolute url, and it is http then do a standard webhook */ if (this._isAbsoluteUrl(url) && url.startsWith('http')) { this.logger.debug({hook}, 'WsRequestor: sending a webhook (HTTP)'); - const requestor = new HttpRequestor(this.logger, this.account_sid, hook, this.secret); - //const requestor = new HttpRequestor(this.logger, this.account_sid, {url: hook}, this.secret); + const h = typeof hook === 'object' ? hook : {url: hook}; + const requestor = new HttpRequestor(this.logger, this.account_sid, h, this.secret); if (type === 'session:redirect') { this.close(); this.emit('handover', requestor);