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(
|
let locale = min.core.getParam(
|
||||||
min.instance,
|
min.instance,
|
||||||
'Default User Language',
|
'Default User Language',
|
||||||
GBConfigService.get('DEFAULT_USER_LANGUAGE')
|
GBConfigService.get('DEFAULT_USER_LANGUAGE')).toLowerCase();
|
||||||
);
|
|
||||||
const detectLanguage =
|
const detectLanguage =
|
||||||
min.core.getParam(
|
min.core.getParam(
|
||||||
min.instance,
|
min.instance,
|
||||||
'Language Detector',
|
'Language Detector',
|
||||||
GBConfigService.getBoolean('LANGUAGE_DETECTOR')
|
GBConfigService.getBoolean('LANGUAGE_DETECTOR')).toLowerCase()
|
||||||
) === 'true';
|
=== '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);
|
||||||
|
@ -1090,7 +1089,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')
|
GBConfigService.get('DEFAULT_CONTENT_LANGUAGE').toLowerCase()
|
||||||
);
|
);
|
||||||
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}.`);
|
||||||
|
|
|
@ -696,9 +696,7 @@ ENDPOINT_UPDATE=true
|
||||||
value = instance['dataValues'][name];
|
value = instance['dataValues'][name];
|
||||||
if (value === null) {
|
if (value === null) {
|
||||||
const minBoot = GBServer.globals.minBoot as any;
|
const minBoot = GBServer.globals.minBoot as any;
|
||||||
if (minBoot.instance && minBoot.instance.datavalues) {
|
value = minBoot.instance[name];
|
||||||
value = minBoot.instance.datavalues[name];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue