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