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

Closed
eltociear wants to merge 2540 commits from patch-1 into main
3 changed files with 25 additions and 24 deletions
Showing only changes of commit fb6e57b19a - Show all commits

File diff suppressed because one or more lines are too long

View file

@ -1097,7 +1097,7 @@ export class GBConversationalService {
// Detects user typed language and updates their locale profile if applies.
let locale = min.core.getParam(
let locale = user.locale ? user.locale : min.core.getParam(
min.instance,
'Default User Language',
GBConfigService.get('DEFAULT_USER_LANGUAGE'));

View file

@ -958,10 +958,7 @@ export class WhatsappDirectLine extends GBService {
private async WhatsAppCallback(req, res) {
try {
if (req.body && req.body.webhook) {
res.status(200);
res.end();
if (!req.body) {
return;
}
@ -1068,8 +1065,10 @@ export class WhatsappDirectLine extends GBService {
user = await sec.ensureUser(urlMin, id, '', '', 'omnichannel', '', '');
user = await sec.updateUserInstance(id, urlMin.instance.instanceId);
if (locale){
user = await sec.updateUserLocale(user.userId, locale);
}
}
let activeMin;