fix(all): Fix search on others bots than boot.

This commit is contained in:
Rodrigo Rodriguez 2023-09-11 13:47:36 -03:00
parent d2bd039d32
commit 5812b59bb4

View file

@ -1068,13 +1068,14 @@ export class GBConversationalService {
let locale = min.core.getParam(
min.instance,
'Default User Language',
GBConfigService.get('DEFAULT_USER_LANGUAGE')).toLowerCase();
GBConfigService.get('DEFAULT_USER_LANGUAGE'));
const detectLanguage =
min.core.getParam(
min.instance,
'Language Detector',
GBConfigService.getBoolean('LANGUAGE_DETECTOR')).toLowerCase()
=== 'true';
false) != false;
locale = user.locale;
if (text != '' && detectLanguage && !locale) {
locale = await min.conversationalService.getLanguage(min, text);
@ -1089,7 +1090,7 @@ export class GBConversationalService {
const contentLocale = min.core.getParam(
min.instance,
'Default Content Language',
GBConfigService.get('DEFAULT_CONTENT_LANGUAGE').toLowerCase()
GBConfigService.get('DEFAULT_CONTENT_LANGUAGE')
);
text = await min.conversationalService.translate(min, text, contentLocale);
GBLog.verbose(`Translated text (processMessageActivity): ${text}.`);