diff --git a/samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json b/samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json index a7ec495b43..850692c978 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/README.md b/samples/bot-proactive-messaging-teamsfx/README.md index b5fb7fea92..52180e8783 100644 --- a/samples/bot-proactive-messaging-teamsfx/README.md +++ b/samples/bot-proactive-messaging-teamsfx/README.md @@ -16,10 +16,10 @@ This sample bot showcases proactive messaging capabilities in Microsoft Teams by - Install [dev tunnel cli](https://aka.ms/teamsfx-install-dev-tunnel). - Login with your M365 Account using the command `devtunnel user login`. - Start your local tunnel service by running the command `devtunnel host -p 3978 --protocol http --allow-anonymous`. - - In the `env/.env.local` file, fill in the values for `PROVISIONOUTPUT__BOTOUTPUT__VALIDDOMAIN` and `PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT` with your dev tunnel URL. + - In the `env/.env.local` file, fill in the values for `PROVISIONOUTPUT_BOTOUTPUT_VALIDDOMAIN` and `PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT` with your dev tunnel URL. ``` - PROVISIONOUTPUT__BOTOUTPUT__VALIDDOMAIN=sample-id-3978.devtunnels.ms - PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT=https://sample-id-3978.devtunnels.ms + PROVISIONOUTPUT_BOTOUTPUT_VALIDDOMAIN=sample-id-3978.devtunnels.ms + PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT=https://sample-id-3978.devtunnels.ms ``` - Executing the command `teamsapp provision --env local` in your project directory. - Executing the command `teamsapp deploy --env local` in your project directory. diff --git a/samples/bot-proactive-messaging-teamsfx/aad.manifest.json b/samples/bot-proactive-messaging-teamsfx/aad.manifest.json index c6046e0344..9cb0d8cdaf 100644 --- a/samples/bot-proactive-messaging-teamsfx/aad.manifest.json +++ b/samples/bot-proactive-messaging-teamsfx/aad.manifest.json @@ -1,6 +1,6 @@ { "id": "${{AAD_APP_OBJECT_ID}}", - "name": "${{CONFIG__MANIFEST__APPNAME__SHORT}}-aad", + "name": "${{CONFIG_APPNAME_SHORT}}-aad", "accessTokenAcceptedVersion": 2, "signInAudience": "AzureADMyOrg", "optionalClaims": { @@ -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 17ffda814b..58591c81de 100644 --- a/samples/bot-proactive-messaging-teamsfx/appPackage/manifest.json +++ b/samples/bot-proactive-messaging-teamsfx/appPackage/manifest.json @@ -14,12 +14,12 @@ "outline": "resources/outline.png" }, "name": { - "short": "${{CONFIG__APPNAME__SHORT}}", - "full": "${{CONFIG__MANIFEST__APPNAME__FULL}}" + "short": "${{CONFIG_APPNAME_SHORT}}", + "full": "${{CONFIG_MANIFEST_APPNAME_FULL}}" }, "description": { - "short": "Bot sample for proactive notifications ${{CONFIG__MANIFEST__APPNAME__SHORT}}", - "full": "This bot sends proactive reminders by saving conversation references in Teams. ${{CONFIG__MANIFEST__APPNAME__SHORT}}" + "short": "Bot sample for proactive notifications ${{CONFIG_APPNAME_SHORT}}", + "full": "This bot sends proactive reminders by saving conversation references in Teams. ${{CONFIG_APPNAME_SHORT}}" }, "accentColor": "#FFFFFF", "bots": [ @@ -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 ce195ed28a..858de531bb 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.local b/samples/bot-proactive-messaging-teamsfx/env/.env.local index f562e15ca3..bc11933838 100644 --- a/samples/bot-proactive-messaging-teamsfx/env/.env.local +++ b/samples/bot-proactive-messaging-teamsfx/env/.env.local @@ -1,9 +1,9 @@ # This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. TEAMSFX_ENV=local APP_NAME_SUFFIX=local -CONFIG__MANIFEST__APPNAME__SHORT=ProactiveMessagesTeamsFx -CONFIG__MANIFEST__APPNAME__FULL=Full name for ProactiveMessagesTeamsFx -CONFIG__MANIFEST__DESCRIPTION__SHORT=Short description of ProactiveMessagesTeamsFx -CONFIG__MANIFEST__DESCRIPTION__FULL=Full description of ProactiveMessagesTeamsFx -CONFIG__MANIFEST__ICONS__COLOR=resources/color.png -CONFIG__MANIFEST__ICONS__OUTLINE=resources/outline.png +CONFIG_APPNAME_SHORT=ProactiveMessagesTeamsFx +CONFIG_MANIFEST_APPNAME_FULL=Full name for ProactiveMessagesTeamsFx +CONFIG_MANIFEST_DESCRIPTION_SHORT=Short description of ProactiveMessagesTeamsFx +CONFIG_MANIFEST_DESCRIPTION_FULL=Full description of ProactiveMessagesTeamsFx +CONFIG_MANIFEST_ICONS_COLOR=resources/color.png +CONFIG_MANIFEST_ICONS_OUTLINE=resources/outline.png diff --git a/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml b/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml index 6d6991327c..c6b8e4c3a3 100644 --- a/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml +++ b/samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml @@ -16,7 +16,7 @@ provision: - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty with: - name: ${{CONFIG__MANIFEST__APPNAME__SHORT}}-bot + name: ${{CONFIG_APPNAME_SHORT}}-bot writeToEnvironmentFile: botId: BOT_ID botPassword: SECRET_BOT_PASSWORD @@ -25,8 +25,8 @@ provision: - uses: botFramework/create with: botId: ${{BOT_ID}} - name: ${{CONFIG__MANIFEST__APPNAME__SHORT}}-bot - messagingEndpoint: ${{PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}}/api/messages + name: ${{CONFIG_APPNAME_SHORT}}-bot + 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 diff --git a/samples/bot-proactive-messaging-teamsfx/templates/azure/teamsFx/bot.bicep b/samples/bot-proactive-messaging-teamsfx/templates/azure/teamsFx/bot.bicep index 8b6ac28eb8..0a87e63345 100644 --- a/samples/bot-proactive-messaging-teamsfx/templates/azure/teamsFx/bot.bicep +++ b/samples/bot-proactive-messaging-teamsfx/templates/azure/teamsFx/bot.bicep @@ -19,6 +19,6 @@ resource botWebAppSettings 'Microsoft.Web/sites/config@2021-02-01' = { BOT_ID: botId // ID of your bot BOT_PASSWORD: botAadAppClientSecret // Secret of your bot IDENTITY_ID: provisionOutputs.identityOutput.value.identityClientId // User assigned identity id, the identity is used to access other Azure resources - PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT : provisionOutputs.botOutput.value.siteEndpoint // Site endpoint of AAD application + PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT : provisionOutputs.botOutput.value.siteEndpoint // Site endpoint of AAD application }, currentAppSettings) }