fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 6c0ce4fa10 - Show all commits

View file

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