fix(all): Minor changes in PROD.

This commit is contained in:
Rodrigo Rodriguez 2023-07-31 18:52:11 -03:00
parent e5f41bca78
commit 9b88c330c6
2 changed files with 14 additions and 2 deletions

View file

@ -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,

View file

@ -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(
@ -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 })
);