fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
2 changed files with 3 additions and 3 deletions
Showing only changes of commit c36640e519 - Show all commits

View file

@ -146,7 +146,7 @@ export class GBMinService {
if (process.env.WHATSAPP_WELCOME_DISABLED !== "true") {
let toSwitchMin = GBServer.globals.minInstances.filter(p => p.instance.botId.toLowerCase() === text.toLowerCase())[0];
if (!toSwitchMin) {
toSwitchMin = GBServer.globals.minInstances.filter(p => p.instance.activationCode.toLowerCase() === text.toLowerCase())[0];
toSwitchMin = GBServer.globals.minInstances.filter(p => p.instance.activationCode ? p.instance.activationCode.toLowerCase() === text.toLowerCase() : false)[0];
}
activeMin = toSwitchMin ? toSwitchMin : GBServer.globals.minBoot;

View file

@ -443,7 +443,7 @@ export class KBService implements IGBKBService {
}
else if (channel === 'whatsapp') {
await conversationalService.sendMarkdownToMobile(min, step, null, text);
await conversationalService.sendMarkdownToMobile(min, step, user.userSystemId, text);
}
else {
await min.conversationalService.sendText(min, step, html);