Skip to content

fix: set id as optional for meeting participant events#288

Merged
lilyydu merged 2 commits intomainfrom
lilyydu/set-meeting-participant-id-as-opt
Feb 23, 2026
Merged

fix: set id as optional for meeting participant events#288
lilyydu merged 2 commits intomainfrom
lilyydu/set-meeting-participant-id-as-opt

Conversation

@lilyydu
Copy link
Collaborator

@lilyydu lilyydu commented Feb 23, 2026

pydantic was throwing an error when deserializing the incoming meeting participant activities - "id" is a required param for most incoming activities but is not required for these events. this is only a bug in python, TS/C# are working as expected.

pydantic allows for overriding in subclasses - hence I set it as Optional and default None

docs specify expected payload for meetingParticipantJoin and meetingParticipantLeave here:

https://learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/meeting-apps-apis?tabs=channel-meeting%2Cguest-user%2Cone-on-one-call%2Cdotnet3%2Cdotnet2%2Cdotnet%2Cparticipant-join-event%2Cparticipant-join-event1#receive-meeting-participant-events

Copilot AI review requested due to automatic review settings February 23, 2026 21:51
Copy link
Contributor

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 pull request fixes a deserialization error for meeting participant events (meetingParticipantJoin and meetingParticipantLeave) in Microsoft Teams. According to the Microsoft Teams API specification, these event types do not include an id field in their payload, but the base Activity class requires it. The fix leverages Pydantic's field override capability to make the id field optional for MeetingParticipantEventActivity.

Changes:

  • Override the id field in MeetingParticipantEventActivity to be Optional[str] = None
  • Remove trailing empty comment from type field declaration (minor style improvement)
  • Add documentation explaining that id is optional for meeting participant events

@lilyydu lilyydu merged commit a34aa75 into main Feb 23, 2026
7 checks passed
@lilyydu lilyydu deleted the lilyydu/set-meeting-participant-id-as-opt branch February 23, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants