Skip to content

Commit

Permalink
Merge pull request #1487 from OfficeDev/v-mfurquan/Proactive-teamfx-f…
Browse files Browse the repository at this point in the history
…ixes-2

Bot Proactive Message TeamsFx - Azure Provision Fixes
  • Loading branch information
Mohammed-MSFT authored Dec 19, 2024
2 parents b5cc62f + 66f2a9c commit 5e5ba3a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions samples/bot-proactive-messaging-teamsfx/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion samples/bot-proactive-messaging-teamsfx/aad.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
],
"replyUrlsWithType": [
{
"url": "${{PROVISIONOUTPUT_BOTOUTPUT_SITEENDPOINT}}/auth-end.html",
"url": "${{PROVISIONOUTPUT__BOTOUTPUT__SITEENDPOINT}}/auth-end.html",
"type": "Web"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
"messageTeamMembers"
],
"validDomains": [
"${{PROVISIONOUTPUT_BOTOUTPUT_VALIDDOMAIN}}"
"${{PROVISIONOUTPUT__BOTOUTPUT__VALIDDOMAIN}}"
]
}
4 changes: 2 additions & 2 deletions samples/bot-proactive-messaging-teamsfx/bot/teamsBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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();
});

Expand Down
4 changes: 2 additions & 2 deletions samples/bot-proactive-messaging-teamsfx/env/.env.dev
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions samples/bot-proactive-messaging-teamsfx/teamsapp.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e5ba3a

Please sign in to comment.