Fix targeted message updates by dropping recipient from wire payload (#738) - #739
Fix targeted message updates by dropping recipient from wire payload (#738)#739jibin jose (jibin7jose) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a Teams targeted-message update failure by ensuring targeted ctx.send updates use the targeted update endpoint while omitting recipient from the outbound update payload (since Teams rejects recipient edits on targeted-message updates).
Changes:
- Route targeted updates (
payload.id+recipient.isTargeted === true) throughupdateTargetedActivitywithrecipientremoved from the wire payload. - Add a regression test asserting the targeted update payload omits
recipient.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/apps/src/activity-sender.ts | Strips recipient from targeted update payloads before calling updateTargetedActivity. |
| packages/apps/src/activity-sender.spec.ts | Adds/updates a regression test to ensure targeted update requests omit recipient. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Corina (corinagum)
left a comment
There was a problem hiding this comment.
Hey jibin jose (@jibin7jose), thanks for the PR! I've tested this e2e to validate. I've pinged Shanmathi Mayuram Krithivasan (@ShanmathiMayuramKrithivasan) and asked her to also take a look in case there are updates we need on the wire.
teams.py has the same bug at packages/apps/src/microsoft_teams/apps/activity_send.py:43, which passes the whole activity to update_targeted_activity. teams.net is unaffected because Context.SendAsync has no update path. Would you be interested in helping out with the PY fix?
Summary:
ctx.sendupdates throughupdateTargetedActivitywithout sendingrecipient.recipient.Fixes #738