Allow unknown activity entities and missing channelData#438
Open
dcaayushd wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds forward-compatible handling for unknown activity entity types and relaxes conversationUpdate parsing when channelData is absent.
Changes:
- Introduces
UnknownEntityand includes it in theEntityunion / exports. - Updates
ConversationUpdateActivity.channel_datato be optional with a default ofNone. - Adds unit tests validating
ActivityTypeAdapterbehavior for unknown entities and missingchannelData.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/api/tests/unit/test_activity.py | Adds unit coverage for unknown entity passthrough and optional channel_data on conversation updates. |
| packages/api/src/microsoft_teams/api/models/entity/unknown_entity.py | Introduces a new model type intended to capture unknown/forward-compatible entities. |
| packages/api/src/microsoft_teams/api/models/entity/entity.py | Adds UnknownEntity into the Entity union for parsing. |
| packages/api/src/microsoft_teams/api/models/entity/init.py | Exposes UnknownEntity as part of the public entity API. |
| packages/api/src/microsoft_teams/api/activities/conversation/conversation_update.py | Makes channel_data optional to support payloads without channelData. |
Author
|
@heyitsaamir Could you please review this PR and approve the workflow when you have a chance? Thanks! |
Contributor
Hey @dcaayushd i believe it's some mistake, im not Microsoft staff neither related with teams.py |
Author
|
Sorry about the wrong tag! I'll find the right maintainer to review this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #433
What changed
Why
Real Bot Framework traffic can include new entity types and sometimes skips channelData. These should not block message handling.
Tests