From 66f2a9c88325d0a317a37ecf976f0e1a7f40296d Mon Sep 17 00:00:00 2001 From: Mohammed Furquan Date: Tue, 17 Dec 2024 22:58:36 +0530 Subject: [PATCH] Bot Proactive Teams Fx Azure Provision Fixes --- samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json | 4 ++-- samples/bot-proactive-messaging-teamsfx/aad.manifest.json | 2 +- .../bot-proactive-messaging-teamsfx/appPackage/manifest.json | 2 +- samples/bot-proactive-messaging-teamsfx/bot/teamsBot.js | 4 ++-- samples/bot-proactive-messaging-teamsfx/env/.env.dev | 4 ++-- samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json b/samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json index 850692c978..a7ec495b43 100644 --- a/samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json +++ b/samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json @@ -53,8 +53,8 @@ "access": "public", "writeToEnvironmentFile": { // Keep consistency with upgraded configuration. - "endpoint": "PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT", - "domain": "PROVISIONOUTPUT_BOTOUTPUT_VALIDDOMAIN" + "endpoint": "PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT", + "domain": "PROVISIONOUTPUT__BOTOUTPUT__VALIDDOMAIN" } } ], diff --git a/samples/bot-proactive-messaging-teamsfx/aad.manifest.json b/samples/bot-proactive-messaging-teamsfx/aad.manifest.json index 9cb0d8cdaf..7f9f9d1c0b 100644 --- a/samples/bot-proactive-messaging-teamsfx/aad.manifest.json +++ b/samples/bot-proactive-messaging-teamsfx/aad.manifest.json @@ -93,7 +93,7 @@ ], "replyUrlsWithType": [ { - "url": "${{PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT}}/auth-end.html", + "url": "${{PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}}/auth-end.html", "type": "Web" } ] diff --git a/samples/bot-proactive-messaging-teamsfx/appPackage/manifest.json b/samples/bot-proactive-messaging-teamsfx/appPackage/manifest.json index 58591c81de..49bfafb508 100644 --- a/samples/bot-proactive-messaging-teamsfx/appPackage/manifest.json +++ b/samples/bot-proactive-messaging-teamsfx/appPackage/manifest.json @@ -61,6 +61,6 @@ "messageTeamMembers" ], "validDomains": [ - "${{PROVISIONOUTPUT_BOTOUTPUT_VALIDDOMAIN}}" + "${{PROVISIONOUTPUT__BOTOUTPUT__VALIDDOMAIN}}" ] } \ No newline at end of file diff --git a/samples/bot-proactive-messaging-teamsfx/bot/teamsBot.js b/samples/bot-proactive-messaging-teamsfx/bot/teamsBot.js index 858de531bb..ce195ed28a 100644 --- a/samples/bot-proactive-messaging-teamsfx/bot/teamsBot.js +++ b/samples/bot-proactive-messaging-teamsfx/bot/teamsBot.js @@ -25,7 +25,7 @@ class TeamsBot extends TeamsActivityHandler { for (let cnt = 0; cnt < membersAdded.length; cnt++) { if (membersAdded[cnt].id !== context.activity.recipient.id) { - const welcomeMessage = `Welcome to the Proactive Bot sample. Navigate to ${process.env.PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT}/api/notify to proactively message everyone who has previously messaged this bot.`; + const welcomeMessage = `Welcome to the Proactive Bot sample. Navigate to ${process.env.PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}/api/notify to proactively message everyone who has previously messaged this bot.`; await context.sendActivity(welcomeMessage); } } @@ -38,7 +38,7 @@ class TeamsBot extends TeamsActivityHandler { this.addConversationReference(context.activity); // Echo back what the user said - await context.sendActivity(`You sent '${context.activity.text}'. Navigate to ${process.env.PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT}/api/notify to proactively message everyone who has previously messaged this bot.`); + await context.sendActivity(`You sent '${context.activity.text}'. Navigate to ${process.env.PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}/api/notify to proactively message everyone who has previously messaged this bot.`); await next(); }); diff --git a/samples/bot-proactive-messaging-teamsfx/env/.env.dev b/samples/bot-proactive-messaging-teamsfx/env/.env.dev index 7de008175a..2f5026b787 100644 --- a/samples/bot-proactive-messaging-teamsfx/env/.env.dev +++ b/samples/bot-proactive-messaging-teamsfx/env/.env.dev @@ -1,5 +1,5 @@ # This file includes environment variables that will be committed to git by default. TEAMSFX_ENV=dev APP_NAME_SUFFIX=dev -CONFIG__MANIFEST__APPNAME__SHORT=Proactive Messages Demo -CONFIG__MANIFEST__APPNAME__FULL=Proactive Messages Demo +CONFIG_APPNAME_SHORT=Proactive Messages Demo +CONFIG_MANIFEST_APPNAME_FULL=Proactive Messages Demo \ No newline at end of file diff --git a/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml b/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml index c6b8e4c3a3..87e20c1944 100644 --- a/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml +++ b/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml @@ -26,7 +26,7 @@ provision: with: botId: ${{BOT_ID}} name: ${{CONFIG_APPNAME_SHORT}}-bot - messagingEndpoint: ${{PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT}}/api/messages + messagingEndpoint: ${{PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}}/api/messages description: "" channels: - name: msteams @@ -59,7 +59,7 @@ deploy: with: target: ./bot/.env.teamsfx.local envs: - INITIATE_LOGIN_ENDPOINT: ${{PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT}}/auth-start.html + INITIATE_LOGIN_ENDPOINT: ${{PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}}/auth-start.html M365_APPLICATION_ID_URI: api://botid-${{BOT_ID}} # Run npm command