fix(all): sendFile working after path fix.

This commit is contained in:
Rodrigo Rodriguez 2020-10-14 13:43:58 -03:00
parent d8c5458a1f
commit 2c901f451b
4 changed files with 16 additions and 10 deletions

3
.vscode/launch.json vendored
View file

@ -18,8 +18,7 @@
"node_modules/**/*.js"
],
"outFiles": [
"${workspaceRoot}/dist/*.js"
],
"${workspaceRoot}/dist/**/*.js"],
"stopOnEntry": false,
"console": "integratedTerminal"
}

View file

@ -95,7 +95,6 @@ class SysClass {
await timeout(seconds * 1000);
}
public async set(file: string, address: string, value: any): Promise<any> {
try {
let token = await this.min.adminService.acquireElevatedToken(this.min.instance.instanceId);
@ -441,7 +440,14 @@ export class DialogClass {
}
public async sendFile(step, filename, caption) {
let url = urlJoin(GBServer.globals.publicAddress, 'kb', this.min.botId + '.gbkb', 'assets', filename);
let url = urlJoin(
GBServer.globals.publicAddress,
'kb',
`${this.min.botId}.gbai`,
`${this.min.botId}.gbkb`,
'assets',
filename
);
await this.min.conversationalService.sendFile(this.min, step, null, url, caption);
}

View file

@ -36,7 +36,7 @@
'use strict';
import { MessageFactory, RecognizerResult } from 'botbuilder';
import { MessageFactory, RecognizerResult, TurnContext } from 'botbuilder';
import { LuisRecognizer } from 'botbuilder-ai';
import { GBDialogStep, GBLog, GBMinInstance, IGBCoreService } from 'botlib';
import { GBServer } from '../../../src/app';

View file

@ -228,6 +228,7 @@ export class GBMinService {
await this.deployer.deployPackage(min, 'packages/default.gbtheme');
// Install per bot deployed packages.
let packagePath = `work/${min.botId}.gbai/${min.botId}.gbdialog`;