Fix GetParticipantAsync#277
Conversation
Refactored MeetingParticipant to use MeetingInfo and Conversation properties, removing Id, Role, IsOrganizer, and JoinTime. Changed GetParticipantAsync to require tenantId and updated its request URL. Added OnConversationUpdate handler and GetMeetingId helper in Program.cs. Updated unit tests to match new method signature and data structure.
There was a problem hiding this comment.
Pull request overview
This pull request refactors the GetParticipantAsync API method to require a tenantId parameter and restructures the MeetingParticipant model to better encapsulate meeting context. The changes remove individual properties like Id, Role, IsOrganizer, and JoinTime from MeetingParticipant, replacing them with structured Meeting and Conversation properties. A new MeetingInfo class was introduced to hold meeting-specific details.
Changes:
- Updated
GetParticipantAsyncto requiretenantIdparameter with URL path encoding formeetingIdandid - Refactored
MeetingParticipantmodel structure with newMeetingInfoandConversationproperties - Added sample implementation in
Program.csdemonstrating meeting ID extraction and participant retrieval
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| Libraries/Microsoft.Teams.Api/Clients/MeetingClient.cs | Updated API signature for GetParticipantAsync, refactored MeetingParticipant model, and added MeetingInfo class |
| Tests/Microsoft.Teams.Api.Tests/Clients/MeetingClientTests.cs | Updated test to reflect new method signature and validate new data structure |
| Samples/Samples.Meetings/Program.cs | Added OnConversationUpdate handler and GetMeetingId helper to demonstrate new API usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Properly URL-encode tenantId in GetParticipantAsync for safety. - Add MeetingInfo class to represent participant role/status. - Add XML docs to MeetingParticipant properties. - Remove OnConversationUpdate handler and GetMeetingId helper for simplicity.
|
@copilot can you review this PR again and resolve the conversations? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
original issue in microsoft/teams.net#276 similiar fix to microsoft/teams.net#277 locally tested: <img width="1062" height="206" alt="image" src="https://github.com/user-attachments/assets/6a75c516-504e-4d2d-a7ac-c63c33005f20" /> Co-authored-by: lilydu <[email protected]>
fixes microsoft#276 Refactored MeetingParticipant to use MeetingInfo and Conversation properties, removing Id, Role, IsOrganizer, and JoinTime. Changed GetParticipantAsync to require tenantId and updated its request URL. Added OnConversationUpdate handler and GetMeetingId helper in Program.cs. Updated unit tests to match new method signature and data structure. This pull request updates the `MeetingParticipant` model and related API methods to improve how meeting participant details are retrieved and represented. The changes primarily focus on restructuring the participant data, updating API signatures to support tenant scoping, and adjusting tests and sample usage accordingly. **API and Model Updates:** * The `GetParticipantAsync` method in `MeetingClient` now requires a `tenantId` parameter and encodes all path and query parameters for safety. * The `MeetingParticipant` class has been refactored: properties like `Id`, `Role`, `IsOrganizer`, and `JoinTime` were removed, and new properties `Meeting` (of type `MeetingInfo`) and `Conversation` were added to better encapsulate participant context. * A new `MeetingInfo` class was introduced to hold meeting-specific participant details such as `Role` and `InMeeting`. **Sample and Test Adjustments:** * The sample app (`Program.cs`) now demonstrates how to extract the meeting ID from activity channel data and fetch participant details using the updated API signature, including the new `tenantId` parameter. * Tests for `MeetingClient.GetParticipantAsync` were updated to reflect the new method signature and model structure, ensuring correct property mapping and URL construction. [[1]](diffhunk://#diff-70a048c1ea63a31b7fe79f1d9224e53e0562360bdc4a5069747720255a62ffb2L58-R60) [[2]](diffhunk://#diff-70a048c1ea63a31b7fe79f1d9224e53e0562360bdc4a5069747720255a62ffb2L71-R76) **Minor Cleanups:** * Unused usings were removed and necessary ones added in the sample app for clarity and correctness.
fixes #276
Refactored MeetingParticipant to use MeetingInfo and Conversation properties, removing Id, Role, IsOrganizer, and JoinTime. Changed GetParticipantAsync to require tenantId and updated its request URL. Added OnConversationUpdate handler and GetMeetingId helper in Program.cs. Updated unit tests to match new method signature and data structure.
This pull request updates the
MeetingParticipantmodel and related API methods to improve how meeting participant details are retrieved and represented. The changes primarily focus on restructuring the participant data, updating API signatures to support tenant scoping, and adjusting tests and sample usage accordingly.API and Model Updates:
GetParticipantAsyncmethod inMeetingClientnow requires atenantIdparameter and encodes all path and query parameters for safety.MeetingParticipantclass has been refactored: properties likeId,Role,IsOrganizer, andJoinTimewere removed, and new propertiesMeeting(of typeMeetingInfo) andConversationwere added to better encapsulate participant context.MeetingInfoclass was introduced to hold meeting-specific participant details such asRoleandInMeeting.Sample and Test Adjustments:
Program.cs) now demonstrates how to extract the meeting ID from activity channel data and fetch participant details using the updated API signature, including the newtenantIdparameter.MeetingClient.GetParticipantAsyncwere updated to reflect the new method signature and model structure, ensuring correct property mapping and URL construction. [1] [2]Minor Cleanups: