new(whatsapp.gblib): Multiple providers can be loaded at once.
This commit is contained in:
parent
76b862cbde
commit
6c0ce4fa10
1 changed files with 7 additions and 6 deletions
|
@ -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 = "";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue