From 3bbd732fd44d47b90b28402de567d23443a412c9 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Wed, 19 Jul 2023 08:03:39 -0300 Subject: [PATCH] fix(all): Create bot working again. --- packages/core.gbapp/services/GBDeployer.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/core.gbapp/services/GBDeployer.ts b/packages/core.gbapp/services/GBDeployer.ts index 4286a824..b9201f26 100644 --- a/packages/core.gbapp/services/GBDeployer.ts +++ b/packages/core.gbapp/services/GBDeployer.ts @@ -104,7 +104,7 @@ export class GBDeployer implements IGBDeployer { * Retrives token and initialize drive client API. */ public static async internalGetDriveClient(min: GBMinInstance) { - const token = await min.adminService['acquireElevatedToken'](min.instance.instanceId, true); + const token = await (min.adminService as any)['acquireElevatedToken'](min.instance.instanceId, true); const siteId = process.env.STORAGE_SITE_ID; const libraryId = process.env.STORAGE_LIBRARY; @@ -208,8 +208,9 @@ export class GBDeployer implements IGBDeployer { const bootInstance = GBServer.globals.bootInstance; // Gets the access token to perform service operations. - - const accessToken = await min.adminService['acquireElevatedToken'](min.instance.instanceId, true); + const accessToken = await + (GBServer.globals.minBoot.adminService as any)['acquireElevatedToken'] + (bootInstance.instanceId, true); // Creates the MSFT application that will be associated to the bot. @@ -401,7 +402,9 @@ export class GBDeployer implements IGBDeployer { // Connects to MSFT storage. - const token = await min.adminService['acquireElevatedToken'](min.instance.instanceId, true); + const token = await + (min.adminService as any)['acquireElevatedToken'](min.instance.instanceId, true); + const client = MicrosoftGraph.Client.init({ authProvider: done => { done(null, token);