@open-wa/wa-automate 4.46.2 → 4.46.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,7 +108,7 @@ const setupChatwootOutgoingMessageHandler = (cliConfig, client) => __awaiter(voi
108
108
  const port = _u.port || 80;
109
109
  const accountNumber = yield client.getHostNumber();
110
110
  const proms = [];
111
- let expectedSelfWebhookUrl = cliConfig.apiHost ? `${cliConfig.apiHost}/chatwoot ` : `${cliConfig.host.includes('http') ? '' : 'http://'}${cliConfig.host}:${cliConfig.port}/chatwoot `;
111
+ let expectedSelfWebhookUrl = cliConfig.apiHost ? `${cliConfig.apiHost}/chatwoot ` : `${cliConfig.host.includes('http') ? '' : `http${cliConfig.https || (cliConfig.cert && cliConfig.privkey) ? 's' : ''}://`}${cliConfig.host}:${cliConfig.port}/chatwoot `;
112
112
  expectedSelfWebhookUrl = expectedSelfWebhookUrl.trim();
113
113
  if (cliConfig.key)
114
114
  expectedSelfWebhookUrl = `${expectedSelfWebhookUrl}?api_key=${cliConfig.key}`;
@@ -100,6 +100,7 @@ const setupHttpServer = (cliConfig) => {
100
100
  if (privContents && certContents) {
101
101
  const options = { key: privContents, cert: certContents };
102
102
  exports.server = https_1.default.createServer(options, exports.app);
103
+ cliConfig.https = true;
103
104
  return;
104
105
  }
105
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.46.2",
3
+ "version": "4.46.3",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",