Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot Proactive Message TeamsFx - Azure Provision Fixes #1487

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading