fix(all): Fix user switching on a single chip.
This commit is contained in:
parent
d261ea371b
commit
69e4062146
1 changed files with 10 additions and 5 deletions
|
@ -771,6 +771,8 @@ export class GBMinService {
|
||||||
const group = min.core.getParam<string>(min.instance, 'WhatsApp Group ID', null);
|
const group = min.core.getParam<string>(min.instance, 'WhatsApp Group ID', null);
|
||||||
|
|
||||||
WhatsappDirectLine.botGroups[min.botId] = group;
|
WhatsappDirectLine.botGroups[min.botId] = group;
|
||||||
|
|
||||||
|
const minBoot = GBServer.globals.minBoot as any;
|
||||||
|
|
||||||
// If there is WhatsApp configuration specified, initialize
|
// If there is WhatsApp configuration specified, initialize
|
||||||
// infrastructure objects.
|
// infrastructure objects.
|
||||||
|
@ -788,7 +790,6 @@ export class GBMinService {
|
||||||
|
|
||||||
await min.whatsAppDirectLine.setup(true);
|
await min.whatsAppDirectLine.setup(true);
|
||||||
} else {
|
} else {
|
||||||
const minBoot = GBServer.globals.minBoot as any;
|
|
||||||
if (min !== minBoot && minBoot.instance.whatsappServiceKey) {
|
if (min !== minBoot && minBoot.instance.whatsappServiceKey) {
|
||||||
min.whatsAppDirectLine = new WhatsappDirectLine(
|
min.whatsAppDirectLine = new WhatsappDirectLine(
|
||||||
min,
|
min,
|
||||||
|
@ -803,11 +804,15 @@ export class GBMinService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const botNumber = min.core.getParam<string>(min.instance, 'Bot Number', null);
|
// Builds bot numbers map in WhatsAppDirectLine globals.
|
||||||
if (botNumber){
|
|
||||||
WhatsappDirectLine.botsByNumber[botNumber] = min.whatsAppDirectLine;
|
let botNumber = min.core.getParam<string>(min.instance, 'Bot Number', null);
|
||||||
|
if (!botNumber){
|
||||||
|
botNumber = minBoot.core.getParam(minBoot.instance, 'Bot Number', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WhatsappDirectLine.botsByNumber[botNumber] = min.whatsAppDirectLine;
|
||||||
|
|
||||||
// Setups default BOT Framework dialogs.
|
// Setups default BOT Framework dialogs.
|
||||||
|
|
||||||
min.userProfile = conversationState.createProperty('userProfile');
|
min.userProfile = conversationState.createProperty('userProfile');
|
||||||
|
|
Loading…
Add table
Reference in a new issue