Skip to content

Updated quoted replies & new quotes features#321

Open
corinagum wants to merge 14 commits intomainfrom
cg/quoted-replies
Open

Updated quoted replies & new quotes features#321
corinagum wants to merge 14 commits intomainfrom
cg/quoted-replies

Conversation

@corinagum
Copy link
Contributor

@corinagum corinagum commented Mar 23, 2026

image
  • Remove with_reply_to_id()
  • Add QuotedReplyEntity Pydantic model with nested QuotedReplyData (message_id required, sender_id/sender_name/preview/time/is_reply_deleted/validated_message_reference optional); register in Entity union
  • Add get_quoted_messages() on MessageActivity to read inbound quoted reply entities
  • Add add_quoted_reply(message_id, response?) builder on MessageActivityInput
  • Update reply() to stamp QuotedReplyEntity + <quoted messageId="..."/> placeholder instead of blockquote HTML; remove reply_to_id assignment
  • Add quote_reply() on ActivityContext
  • Mark all quoted reply types and methods as @experimental
  • Add quoted-replies example exercising all APIs

@corinagum corinagum marked this pull request as ready for review March 24, 2026 18:19
Copilot AI review requested due to automatic review settings March 24, 2026 18:19
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 PR updates how “quoted replies” are represented and built in the Microsoft Teams SDK for Python by moving from reply_to_id/blockquote HTML to a dedicated quotedReply entity plus a <quoted messageId="..."/> placeholder, and exposes new helper APIs for creating and reading quoted replies.

Changes:

  • Add QuotedReplyData / QuotedReplyEntity models and register QuotedReplyEntity in the entity union.
  • Update outbound reply building (ActivityContext.reply() / quote_reply(), MessageActivityInput.add_quoted_reply()) and inbound parsing (MessageActivity.get_quoted_messages()).
  • Add unit tests and a new examples/quoted-replies sample app; remove with_reply_to_id().

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
uv.lock Adds the new quoted-replies example as a workspace member/package entry.
packages/apps/tests/test_quoted_reply.py New tests validating quoted reply stamping/placeholder behavior.
packages/apps/tests/test_activity_context.py Updates reply tests to assert quotedReply entity + placeholder; removes one targeted-send inference test.
packages/apps/src/microsoft_teams/apps/routing/activity_context.py Implements quotedReply stamping in reply() and adds quote_reply().
packages/api/tests/unit/test_quoted_reply_entity.py Tests serialization/deserialization for the new quoted reply models.
packages/api/tests/unit/test_quoted_replies_property.py Tests inbound filtering (get_quoted_messages) and outbound builder (add_quoted_reply).
packages/api/tests/unit/test_activity.py Removes usage/assertion for the deleted with_reply_to_id() builder.
packages/api/src/microsoft_teams/api/models/entity/quoted_reply_entity.py Introduces QuotedReplyData and QuotedReplyEntity models (experimental).
packages/api/src/microsoft_teams/api/models/entity/entity.py Registers QuotedReplyEntity in the Entity union.
packages/api/src/microsoft_teams/api/models/entity/init.py Exports QuotedReplyData and QuotedReplyEntity.
packages/api/src/microsoft_teams/api/models/activity.py Removes with_reply_to_id() builder.
packages/api/src/microsoft_teams/api/activities/message/message.py Adds get_quoted_messages() and add_quoted_reply() on message activities.
examples/quoted-replies/src/main.py New example bot demonstrating all quoted-reply APIs.
examples/quoted-replies/pyproject.toml Adds project metadata/deps for the new example.
examples/quoted-replies/README.md Adds run instructions and command list for the example.
.coverage Adds a coverage database artifact to the repo (should not be committed).

@corinagum corinagum changed the title Updated quoted replies Updated quoted replies & new quotes features Mar 25, 2026
Corina Gum and others added 2 commits March 25, 2026 12:42
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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