Skip to content

Commit

Permalink
fix(core.gbapp): Custom boot dialog only available to boot bot.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Mar 9, 2020
1 parent efea36f commit 946a66b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
3 changes: 2 additions & 1 deletion packages/core.gbapp/dialogs/WelcomeDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export class WelcomeDialog extends IGBDialog {
min.dialogs.add(new WaterfallDialog('/', [
async step => {

if (GBServer.globals.entryPointDialog !== null)
if (GBServer.globals.entryPointDialog !== null &&
min.instance.botId === process.env.BOT_ID)
{
return step.replaceDialog(GBServer.globals.entryPointDialog);
}
Expand Down
1 change: 0 additions & 1 deletion packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ export class GBDeployer {
instance.adminPass = GBAdminService.getRndPassword();
instance.title = botId;


await this.core.saveInstance(instance);

return await this.deployBotFull(instance, GBServer.globals.publicAddress);
Expand Down
29 changes: 2 additions & 27 deletions packages/sharepoint.gblib/services/SharePointService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,14 @@

'use strict';

import { HttpHeaders, HttpMethods, ServiceClient, WebResource } from '@azure/ms-rest-js';
import { CognitiveServicesManagementClient } from 'azure-arm-cognitiveservices';
import { ResourceManagementClient, SubscriptionClient } from 'azure-arm-resource';
import { SearchManagementClient } from 'azure-arm-search';
import { SqlManagementClient } from 'azure-arm-sql';
import { WebSiteManagementClient } from 'azure-arm-website';
//tslint:disable-next-line:no-submodule-imports
import { AppServicePlan, Site, SiteConfigResource, SiteLogsConfig, SiteSourceControl } from 'azure-arm-website/lib/models';
import { GBLog, IGBInstallationDeployer, IGBInstance } from 'botlib';
import { GBAdminService } from '../../admin.gbapp/services/GBAdminService';
import { GBCorePackage } from '../../core.gbapp';
import { GBConfigService } from '../../core.gbapp/services/GBConfigService';
import { GBDeployer } from '../../core.gbapp/services/GBDeployer';
const MicrosoftGraph = require("@microsoft/microsoft-graph-client");

const Spinner = require('cli-spinner').Spinner;
// tslint:disable-next-line: no-submodule-imports
import * as simplegit from 'simple-git/promise';
const git = simplegit();

// tslint:disable-next-line:no-submodule-imports
import { CognitiveServicesAccount } from 'azure-arm-cognitiveservices/lib/models';
import urlJoin = require('url-join');
const iconUrl = 'https://github.com/pragmatismo-io/BotServer/blob/master/docs/images/generalbots-logo-squared.png';
const publicIp = require('public-ip');
const WebSiteResponseTimeout = 900;
const { sppull } = require("sppull");

/**
* Service facade for SharePoint Online.
*/
export class GBSharePointService {

public async downloadFolder(localPath: string, siteUrl: string, folderUrl: string, username: string, password: string) {
const { sppull } = require("sppull");

const context = {
siteUrl: siteUrl,
Expand All @@ -87,4 +61,5 @@ export class GBSharePointService {
return await sppull(context, options);
}


}

0 comments on commit 946a66b

Please sign in to comment.