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 7 deletions
Showing only changes of commit b69ffa91d9 - Show all commits

View file

@ -807,12 +807,10 @@ 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.
min.userProfile = conversationState.createProperty('userProfile'); min.userProfile = conversationState.createProperty('userProfile');

View file

@ -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.