Skip to content

Conversation

Mohammed-MSFT
Copy link
Contributor

No description provided.

@Mohammed-MSFT Mohammed-MSFT added bug Something isn't working DO NOT MERGE Do not merge the PR due to incomplete changes or feature hasn't released yet. labels Jun 12, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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"]
Copy link
Preview

Copilot AI Jul 16, 2025

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 *'.

Suggested change
__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
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
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",
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
"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
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
title: Microsoft Teams Python Hello World Sample
title: Microsoft Teams Python Meetings App Icon Badging Sample

Copilot uses AI. Check for mistakes.

Comment on lines +7 to +17
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.
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
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
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
# 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.
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
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
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
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",
Copy link
Preview

Copilot AI Jul 16, 2025

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.

Suggested change
"ms-python.python",
"ms-python.python"

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DO NOT MERGE Do not merge the PR due to incomplete changes or feature hasn't released yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant