Add support for Targeted Messages#264
Merged
heyitsaamir merged 4 commits intomicrosoft:mainfrom Jan 30, 2026
Merged
Conversation
Copilot started reviewing on behalf of
ShanmathiMayuramKrithivasan
January 28, 2026 12:49
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for “targeted” (recipient-scoped) message activities by routing targeted sends/updates through specialized conversation APIs and providing an example bot.
Changes:
- Add
is_targeted+with_targeted_recipient(...)onMessageActivityInputto mark messages as targeted and optionally set a recipient. - Route app-layer sends/updates to new API client methods that append
?isTargetedActivity=true. - Add an example app and unit tests covering the new model/client surfaces.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Adds the new examples/targeted-messages workspace package to the lock/workspace members. |
| packages/apps/src/microsoft_teams/apps/routing/activity_context.py | Infers recipient for targeted sends in reactive contexts (sender-targeted). |
| packages/apps/src/microsoft_teams/apps/http_plugin.py | Chooses targeted vs non-targeted create/update API routes based on is_targeted. |
| packages/apps/src/microsoft_teams/apps/app.py | Validates proactive targeted sends require an explicit recipient. |
| packages/api/tests/unit/test_message_activities.py | Adds tests for with_targeted_recipient and serialization of isTargeted. |
| packages/api/tests/unit/test_conversation_client.py | Adds tests for the new targeted activity operations. |
| packages/api/src/microsoft_teams/api/clients/conversation/client.py | Exposes create_targeted/update_targeted/delete_targeted on activity operations. |
| packages/api/src/microsoft_teams/api/clients/conversation/activity.py | Implements targeted create/update/delete URLs using isTargetedActivity=true. |
| packages/api/src/microsoft_teams/api/activities/message/message.py | Introduces is_targeted field and builder method with_targeted_recipient. |
| examples/targeted-messages/src/main.py | Adds a runnable bot demonstrating targeted send/reply/update/delete flows. |
| examples/targeted-messages/pyproject.toml | Adds new example package definition and dependencies. |
| examples/targeted-messages/README.md | Documents commands and how targeted messages work. |
heyitsaamir
reviewed
Jan 28, 2026
Collaborator
heyitsaamir
left a comment
There was a problem hiding this comment.
minor comments, but overall looks good. Once you make these changes, I'll merge it
packages/api/src/microsoft_teams/api/clients/conversation/activity.py
Outdated
Show resolved
Hide resolved
heyitsaamir
approved these changes
Jan 30, 2026
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.
Adds support for targeted messages that only a specific recipient can see in a conversation.
Usage
Key Changes