-
Notifications
You must be signed in to change notification settings - Fork 870
Do Not Merge - Python Migration Meetings App Icon Badging Sample #1692
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a Python migration of the Microsoft Teams meetings app icon badging sample, demonstrating how to utilize the targeted notifications API for app icon badging during Teams meetings. The migration creates a complete Python implementation using Bot Framework v4 SDK and aiohttp web framework.
Key changes:
- Complete Python bot implementation with TeamsActivityHandler for meeting notifications
- Web server setup with aiohttp for serving HTML views and handling bot messages
- Teams manifest and Azure infrastructure configuration for deployment
Reviewed Changes
Copilot reviewed 23 out of 26 changed files in this pull request and generated 9 comments.
Show a summary per file
File | Description |
---|---|
bots/teamsBot.py | Core bot implementation with meeting notification handlers for stage view and app icon badging |
app.py | Main web server application using aiohttp with bot message processing and view routing |
requirements.txt | Python dependencies including botbuilder SDK packages |
README.md | Documentation with setup instructions and feature descriptions |
appManifest/manifest.json | Teams app manifest configuration with bot and tab definitions |
config.py | Bot configuration class for environment variables |
Various infrastructure files | Azure deployment, VS Code settings, and environment configuration files |
@@ -0,0 +1,3 @@ | |||
from .teamsBot import TeamsBot | |||
|
|||
__all__ = ["MeetingContextApp"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The all list contains 'MeetingContextApp' but the actual imported class is 'TeamsBot'. This will cause ImportError when using 'from bots import *'.
__all__ = ["MeetingContextApp"] | |
__all__ = ["TeamsBot"] |
Copilot uses AI. Check for mistakes.
async def visual_indicator( | ||
self, context: TurnContext, meeting_id: str, selected_members: list[str] | ||
): | ||
from botbuilder.schema.teams._models_py3 import TargetedMeetingNotification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import statement should be moved to the top of the file rather than inside a method. This follows Python best practices and improves code readability.
from botbuilder.schema.teams._models_py3 import TargetedMeetingNotification | |
# The import for TargetedMeetingNotification has been moved to the top of the file. |
Copilot uses AI. Check for mistakes.
"source": "officeDev", | ||
"title": "Meetings-App-Icon-Badging", | ||
"shortDescription": "This sample demonstrates how to utilize the targeted notifications API for app icon badging during Teams meetings.", | ||
"url": "https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-app-icon-badging/nodejs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL points to the nodejs version of the sample instead of the python version. This should be updated to point to the correct python sample path.
"url": "https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-app-icon-badging/nodejs", | |
"url": "https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-app-icon-badging/python", |
Copilot uses AI. Check for mistakes.
- office-365 | ||
languages: | ||
- python | ||
title: Microsoft Teams Python Hello World Sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title incorrectly identifies this as a 'Hello World Sample' when it should be 'Meetings App Icon Badging Sample' to match the actual functionality.
title: Microsoft Teams Python Hello World Sample | |
title: Microsoft Teams Python Meetings App Icon Badging Sample |
Copilot uses AI. Check for mistakes.
title: Microsoft Teams Python Hello World Sample | ||
description: This sample demonstrates how to retrieve and display meeting context and participant details in Microsoft Teams using the bot's Meeting API. | ||
extensions: | ||
contentType: samples | ||
createdDate: 02/24/2025 10:02:21 PM | ||
urlFragment: officedev-microsoft-teams-samples-meetings-context-app-python | ||
--- | ||
|
||
# Teams Meeting Context Sample Python | ||
|
||
This sample application illustrates how to display the meeting context object in a Microsoft Teams meeting tab, utilizing the bot's Meeting API to fetch participant and meeting details. Users can interact with the bot to obtain comprehensive information about participants and meeting specifics, such as start times, end times, and joining URLs, thereby enriching the collaborative experience within Teams. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description is incorrect for this sample. It describes meeting context functionality rather than app icon badging notifications, which is the actual purpose of this sample.
title: Microsoft Teams Python Hello World Sample | |
description: This sample demonstrates how to retrieve and display meeting context and participant details in Microsoft Teams using the bot's Meeting API. | |
extensions: | |
contentType: samples | |
createdDate: 02/24/2025 10:02:21 PM | |
urlFragment: officedev-microsoft-teams-samples-meetings-context-app-python | |
--- | |
# Teams Meeting Context Sample Python | |
This sample application illustrates how to display the meeting context object in a Microsoft Teams meeting tab, utilizing the bot's Meeting API to fetch participant and meeting details. Users can interact with the bot to obtain comprehensive information about participants and meeting specifics, such as start times, end times, and joining URLs, thereby enriching the collaborative experience within Teams. | |
title: Microsoft Teams Python App Icon Badging Sample | |
description: This sample demonstrates how to implement app icon badging notifications in Microsoft Teams using Python. | |
extensions: | |
contentType: samples | |
createdDate: 02/24/2025 10:02:21 PM | |
urlFragment: officedev-microsoft-teams-samples-meetings-context-app-python | |
--- | |
# Teams App Icon Badging Sample Python | |
This sample application illustrates how to implement app icon badging notifications in Microsoft Teams. App icon badging provides visual indicators on the app icon to notify users of updates or actions requiring their attention, enhancing user engagement and productivity within Teams. |
Copilot uses AI. Check for mistakes.
urlFragment: officedev-microsoft-teams-samples-meetings-context-app-python | ||
--- | ||
|
||
# Teams Meeting Context Sample Python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heading incorrectly refers to 'Meeting Context Sample' when it should be 'Meetings App Icon Badging Sample Python' to accurately reflect the sample's functionality.
# Teams Meeting Context Sample Python | |
# Meetings App Icon Badging Sample Python |
Copilot uses AI. Check for mistakes.
|
||
# Teams Meeting Context Sample Python | ||
|
||
This sample application illustrates how to display the meeting context object in a Microsoft Teams meeting tab, utilizing the bot's Meeting API to fetch participant and meeting details. Users can interact with the bot to obtain comprehensive information about participants and meeting specifics, such as start times, end times, and joining URLs, thereby enriching the collaborative experience within Teams. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description is completely incorrect for this sample. It describes meeting context functionality rather than app icon badging notifications. The description should focus on targeted notifications API and app icon badging in Teams meetings.
This sample application illustrates how to display the meeting context object in a Microsoft Teams meeting tab, utilizing the bot's Meeting API to fetch participant and meeting details. Users can interact with the bot to obtain comprehensive information about participants and meeting specifics, such as start times, end times, and joining URLs, thereby enriching the collaborative experience within Teams. | |
This sample application demonstrates how to implement app icon badging notifications and use the targeted notifications API in Microsoft Teams meetings. It showcases how to send targeted notifications to specific users or groups and update the app icon badge to reflect important updates, enhancing the user experience within Teams. |
Copilot uses AI. Check for mistakes.
version: v1.2 | ||
|
||
additionalMetadata: | ||
sampleTag: Microsoft-Teams-Samples:meeting-context-app-python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sampleTag references 'meeting-context-app-python' but should reference 'meetings-app-icon-badging-python' to match the actual sample being implemented.
sampleTag: Microsoft-Teams-Samples:meeting-context-app-python | |
sampleTag: Microsoft-Teams-Samples:meetings-app-icon-badging-python |
Copilot uses AI. Check for mistakes.
{ | ||
"recommendations": [ | ||
"TeamsDevApp.ms-teams-vscode-extension", | ||
"ms-python.python", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] There is a trailing comma after the last array element which is valid JSON but may cause issues with some parsers. Consider removing the trailing comma for better compatibility.
"ms-python.python", | |
"ms-python.python" |
Copilot uses AI. Check for mistakes.
No description provided.