fix meetingStart and meetingEnd casing bug & add meetings sample#246
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where meeting start and end event activities failed validation due to incorrect field name casing. The Microsoft Teams API sends these fields in PascalCase format (e.g., MeetingType, JoinUrl) rather than camelCase, causing validation errors. The fix updates the field definitions to use PascalCase directly instead of relying on the automatic snake_case to camelCase conversion. Additionally, the PR makes the role field in MeetingParticipantInfo optional to match the actual API behavior, and adds a new meetings sample application to demonstrate usage.
Changes:
- Fixed field name casing in
MeetingStartEventValueandMeetingEndEventValuefrom snake_case to PascalCase to match Teams API - Made the
rolefield optional inMeetingParticipantInfoclass - Added new meetings example application demonstrating meeting event handlers
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/api/src/microsoft_teams/api/activities/event/meeting_start.py | Updated field names from snake_case to PascalCase (Id, MeetingType, JoinUrl, Title, StartTime) to match Teams API format |
| packages/api/src/microsoft_teams/api/activities/event/meeting_end.py | Updated field names from snake_case to PascalCase (Id, MeetingType, JoinUrl, Title, EndTime) to match Teams API format |
| packages/api/src/microsoft_teams/api/activities/event/meeting_participant.py | Added Optional import and made role field optional with default None value |
| examples/meetings/src/main.py | New example demonstrating meeting event handlers for start, end, participant join/leave events |
| examples/meetings/pyproject.toml | Configuration for new meetings example package |
| examples/meetings/README.md | Documentation for meetings example with manifest requirements |
| README.md | Added link to new meetings example in the examples list |
heyitsaamir
left a comment
There was a problem hiding this comment.
try the alias field by Pydantic first. Rest looks good!
# Release version 2.0.0a9 Commits since v2.0.0a8: - Add support for Python 3.14 (#259) - Bump qs from 6.14.0 to 6.14.1 in /examples/tab/Web (#240) - Bump urllib3 from 2.5.0 to 2.6.3 (#251) - Bump authlib from 1.6.5 to 1.6.6 (#252) - Bump starlette from 0.48.0 to 0.49.1 (#261) - Bump fastmcp from 2.12.4 to 2.14.0 (#260) - Bump python-multipart from 0.0.20 to 0.0.22 (#254) - Bump virtualenv from 20.35.3 to 20.36.1 (#256) - Bump pyasn1 from 0.6.1 to 0.6.2 (#255) - Bump azure-core from 1.36.0 to 1.38.0 (#257) - Bump aiohttp from 3.13.0 to 3.13.3 (#258) - fix meetingStart and meetingEnd casing bug & add meetings sample (#246) - Remove jitter during streaming (#248) - Add SERVICE_URL to override default service_url for Teams (#247) - [Fix] streaming: do not reset timeout for each emit, do not wait forever on close stream (#197)
similiar to: microsoft/teams.net#198 and microsoft/teams.ts#434
fixes: #245