fix(all): Locale in Audio is dynamic.
This commit is contained in:
parent
d1c4c23fa1
commit
fb6e57b19a
3 changed files with 25 additions and 24 deletions
2
.wwebjs_cache/2.2407.3.html
Normal file
2
.wwebjs_cache/2.2407.3.html
Normal file
File diff suppressed because one or more lines are too long
|
@ -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'));
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue