Skip to content

Commit

Permalink
fix(all): Minor changes in PROD.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 31, 2023
1 parent e5f41bc commit 9b88c33
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export class GBDeployer implements IGBDeployer {
const s = new TeamsService();
const manifest = await s.getManifest(
instance.marketplaceId,
instance.title,
instance.botId,
instance.description,
GBAdminService.generateUuid(),
instance.botId,
Expand Down
14 changes: 13 additions & 1 deletion packages/core.gbapp/services/GBMinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ export class GBMinService {
* installing all BASIC artifacts from .gbdialog and OAuth2.
*/
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.

const { min, adapter, conversationState } = await this.buildBotAdapter(
Expand Down Expand Up @@ -1241,7 +1251,9 @@ export class GBMinService {
}

// 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(
GBMinService.downloadAttachmentAndWrite.bind({ min, user, params })
);
Expand Down

0 comments on commit 9b88c33

Please sign in to comment.