fix(whatsapp.gblib): Fix in sendFile.

This commit is contained in:
Rodrigo Rodriguez 2020-06-04 21:00:53 -03:00
parent ad1bea141d
commit c36640e519
2 changed files with 3 additions and 3 deletions

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);