new(whatsapp.gblib): Multiple providers can be loaded at once.

This commit is contained in:
Rodrigo Rodriguez 2022-07-09 02:04:17 -03:00
parent 76b862cbde
commit 6c0ce4fa10

View file

@ -150,13 +150,13 @@ export class WhatsappDirectLine extends GBService {
const express = require('express'); const express = require('express');
GBServer.globals.server.use(`/audios`, express.static('work')); GBServer.globals.server.use(`/audios`, express.static('work'));
if (process.env.ENDPOINT_UPDATE === 'true') {
try { try {
const res = await request.post(options); const res = await request.post(options);
} catch (error) { } catch (error) {
GBLog.error(`Error initializing 3rd party Whatsapp provider(1) ${error.message}`); GBLog.error(`Error initializing 3rd party Whatsapp provider(1) ${error.message}`);
}
} }
} }
} }
@ -189,6 +189,7 @@ export class WhatsappDirectLine extends GBService {
return; // Exit here. return; // Exit here.
} }
const message = this.chatapi ? req.body.messages[0] : req.body.message; const message = this.chatapi ? req.body.messages[0] : req.body.message;
let group = ""; let group = "";