fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
2 changed files with 14 additions and 2 deletions
Showing only changes of commit 9b88c330c6 - Show all commits

View file

@ -338,7 +338,7 @@ export class GBDeployer implements IGBDeployer {
const s = new TeamsService(); const s = new TeamsService();
const manifest = await s.getManifest( const manifest = await s.getManifest(
instance.marketplaceId, instance.marketplaceId,
instance.title, instance.botId,
instance.description, instance.description,
GBAdminService.generateUuid(), GBAdminService.generateUuid(),
instance.botId, instance.botId,

View file

@ -295,6 +295,16 @@ export class GBMinService {
* installing all BASIC artifacts from .gbdialog and OAuth2. * installing all BASIC artifacts from .gbdialog and OAuth2.
*/ */
public async mountBot(instance: IGBInstance) { public async mountBot(instance: IGBInstance) {
const manifest = `${instance.botId}-Teams.zip`;
GBLog.info('Generating MS Teams manifest....');
let packageTeams = urlJoin(`work`, DialogKeywords.getGBAIPath(instance.botId), manifest);
if (!Fs.existsSync(packageTeams)) {
const data = await this.deployer.getBotManifest(instance);
Fs.writeFileSync(packageTeams, data);
}
// Build bot adapter. // Build bot adapter.
const { min, adapter, conversationState } = await this.buildBotAdapter( const { min, adapter, conversationState } = await this.buildBotAdapter(
@ -1241,7 +1251,9 @@ export class GBMinService {
} }
// Prepare Promises to download each attachment and then execute each Promise. // Prepare Promises to download each attachment and then execute each Promise.
if (step.context.activity.attachments) { if (step.context.activity.attachments
&& step.context.activity.attachments[0].contentType != 'text/html') {
const promises = step.context.activity.attachments.map( const promises = step.context.activity.attachments.map(
GBMinService.downloadAttachmentAndWrite.bind({ min, user, params }) GBMinService.downloadAttachmentAndWrite.bind({ min, user, params })
); );