Merge branch 'main' of https://github.com/GeneralBots/BotServer
This commit is contained in:
commit
7bdc57a4a1
4 changed files with 19 additions and 13 deletions
|
@ -359,6 +359,8 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
|||
|
||||
GBLog.info(`Enabling resource providers...`);
|
||||
await this.enableResourceProviders('Microsoft.BotService');
|
||||
await this.enableResourceProviders('Microsoft.Web');
|
||||
await this.enableResourceProviders('Microsoft.Sql');
|
||||
|
||||
GBLog.info(`Deploying Deploy Group (It may take a few minutes)...`);
|
||||
await this.createDeployGroup(name, instance.cloudLocation);
|
||||
|
|
|
@ -773,6 +773,7 @@ export class GBMinService {
|
|||
await min.whatsAppDirectLine.setup(true);
|
||||
} else {
|
||||
const minBoot = GBServer.globals.minBoot as any;
|
||||
if (min !== minBoot) {
|
||||
min.whatsAppDirectLine = new WhatsappDirectLine(
|
||||
min,
|
||||
min.botId,
|
||||
|
@ -784,6 +785,7 @@ export class GBMinService {
|
|||
);
|
||||
await min.whatsAppDirectLine.setup(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Setups default BOT Framework dialogs.
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ export class GBSSR {
|
|||
|
||||
// Tries to find botId from URL.
|
||||
|
||||
const minBoot = GBServer.globals.minInstances[0];
|
||||
const minBoot = GBServer.globals.minBoot;
|
||||
let botId =
|
||||
req.originalUrl && req.originalUrl === '/' ?
|
||||
minBoot.botId :
|
||||
|
@ -295,7 +295,9 @@ export class GBSSR {
|
|||
if (!min) {
|
||||
min = req.url === '/'
|
||||
? minBoot
|
||||
: GBServer.globals.minInstances.filter(p => p.instance.activationCode.toLowerCase() === botId.toLowerCase())[0];
|
||||
: GBServer.globals.minInstances.filter(p =>
|
||||
p.instance.activationCode ? p.instance.activationCode.toLowerCase() === botId.toLowerCase()
|
||||
: null)[0];
|
||||
}
|
||||
if (!min) {
|
||||
botId = minBoot.botId;
|
||||
|
|
|
@ -1042,7 +1042,7 @@ export class WhatsappDirectLine extends GBService {
|
|||
}
|
||||
}
|
||||
|
||||
// Detects if the welcome message is enabled.z
|
||||
// Detects if the welcome message is enabled.
|
||||
|
||||
if (process.env.WHATSAPP_WELCOME_DISABLED !== 'true') {
|
||||
// Tries to find if user wants to switch bots.
|
||||
|
|
Loading…
Add table
Reference in a new issue