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,12 +807,10 @@ export class GBMinService {
|
|||
// Builds bot numbers map in WhatsAppDirectLine globals.
|
||||
|
||||
let botNumber = min.core.getParam<string>(min.instance, 'Bot Number', null);
|
||||
if (!botNumber){
|
||||
botNumber = minBoot.core.getParam(minBoot.instance, 'Bot Number', null);
|
||||
if (botNumber){
|
||||
WhatsappDirectLine.botsByNumber[botNumber] = min.whatsAppDirectLine;
|
||||
}
|
||||
|
||||
WhatsappDirectLine.botsByNumber[botNumber] = min.whatsAppDirectLine;
|
||||
|
||||
// Setups default BOT Framework dialogs.
|
||||
|
||||
min.userProfile = conversationState.createProperty('userProfile');
|
||||
|
|
|
@ -317,9 +317,7 @@ export class WhatsappDirectLine extends GBService {
|
|||
|
||||
// Every number must be mapped to a bot, even if shared by boot bot.
|
||||
|
||||
if (newThis === undefined) {
|
||||
throw GBError.create(`Bot Number ${to} not setup for any loaded bot.`);
|
||||
} else {
|
||||
if (newThis) {
|
||||
|
||||
// Reroute to custom bot only if it is not boot bot.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue