fix(all): Fix user switching on a single chip.
This commit is contained in:
parent
700e18006a
commit
b69ffa91d9
2 changed files with 3 additions and 7 deletions
|
@ -807,11 +807,9 @@ export class GBMinService {
|
||||||
// Builds bot numbers map in WhatsAppDirectLine globals.
|
// Builds bot numbers map in WhatsAppDirectLine globals.
|
||||||
|
|
||||||
let botNumber = min.core.getParam<string>(min.instance, 'Bot Number', null);
|
let botNumber = min.core.getParam<string>(min.instance, 'Bot Number', null);
|
||||||
if (!botNumber){
|
if (botNumber){
|
||||||
botNumber = minBoot.core.getParam(minBoot.instance, 'Bot Number', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
WhatsappDirectLine.botsByNumber[botNumber] = min.whatsAppDirectLine;
|
WhatsappDirectLine.botsByNumber[botNumber] = min.whatsAppDirectLine;
|
||||||
|
}
|
||||||
|
|
||||||
// Setups default BOT Framework dialogs.
|
// Setups default BOT Framework dialogs.
|
||||||
|
|
||||||
|
|
|
@ -317,9 +317,7 @@ export class WhatsappDirectLine extends GBService {
|
||||||
|
|
||||||
// Every number must be mapped to a bot, even if shared by boot bot.
|
// Every number must be mapped to a bot, even if shared by boot bot.
|
||||||
|
|
||||||
if (newThis === undefined) {
|
if (newThis) {
|
||||||
throw GBError.create(`Bot Number ${to} not setup for any loaded bot.`);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// Reroute to custom bot only if it is not boot bot.
|
// Reroute to custom bot only if it is not boot bot.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue