fix(all): Fix search on others bots than boot.
This commit is contained in:
parent
436d9d28b8
commit
d2bd039d32
2 changed files with 5 additions and 8 deletions
|
@ -1068,14 +1068,13 @@ export class GBConversationalService {
|
|||
let locale = min.core.getParam(
|
||||
min.instance,
|
||||
'Default User Language',
|
||||
GBConfigService.get('DEFAULT_USER_LANGUAGE')
|
||||
);
|
||||
GBConfigService.get('DEFAULT_USER_LANGUAGE')).toLowerCase();
|
||||
const detectLanguage =
|
||||
min.core.getParam(
|
||||
min.instance,
|
||||
'Language Detector',
|
||||
GBConfigService.getBoolean('LANGUAGE_DETECTOR')
|
||||
) === 'true';
|
||||
GBConfigService.getBoolean('LANGUAGE_DETECTOR')).toLowerCase()
|
||||
=== 'true';
|
||||
locale = user.locale;
|
||||
if (text != '' && detectLanguage && !locale) {
|
||||
locale = await min.conversationalService.getLanguage(min, text);
|
||||
|
@ -1090,7 +1089,7 @@ export class GBConversationalService {
|
|||
const contentLocale = min.core.getParam(
|
||||
min.instance,
|
||||
'Default Content Language',
|
||||
GBConfigService.get('DEFAULT_CONTENT_LANGUAGE')
|
||||
GBConfigService.get('DEFAULT_CONTENT_LANGUAGE').toLowerCase()
|
||||
);
|
||||
text = await min.conversationalService.translate(min, text, contentLocale);
|
||||
GBLog.verbose(`Translated text (processMessageActivity): ${text}.`);
|
||||
|
|
|
@ -696,9 +696,7 @@ ENDPOINT_UPDATE=true
|
|||
value = instance['dataValues'][name];
|
||||
if (value === null) {
|
||||
const minBoot = GBServer.globals.minBoot as any;
|
||||
if (minBoot.instance && minBoot.instance.datavalues) {
|
||||
value = minBoot.instance.datavalues[name];
|
||||
}
|
||||
value = minBoot.instance[name];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue