Open
Conversation
4e0db45 to
70b2cb5
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK’s reply/quote behavior to use Teams “quoted replies” (entity + <quoted .../> placeholder) instead of replyToId/blockquote HTML, adds first-class quoted-reply types/APIs, fixes an ActivityContext constructor enrichment bug, and introduces an example app to exercise the new functionality.
Changes:
- Add
QuotedReplyEntity/QuotedReplyData, plumb intoEntityunion, and addMessageActivity.getQuotedMessages()+addQuotedReply(). - Update
ActivityContext.reply()to stamp quoted-reply metadata + placeholder, and addActivityContext.quoteReply(messageId, ...). - Fix
ActivityContextconstructor ordering bug (enrichment beforeObject.assign) and add regression tests + a new quoted-replies example.
Reviewed changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apps/src/contexts/activity.ts | Adds quoteReply() API, changes reply() quoting behavior, and fixes constructor activity enrichment ordering. |
| packages/apps/src/contexts/activity.test.ts | Updates tests to assert quoted-reply entity + placeholder behavior for reply() and quoteReply(). |
| packages/apps/src/app.process.spec.ts | Regression test ensuring message activities are enriched with interface methods (e.g., getQuotedMessages). |
| packages/api/src/models/entity/quoted-reply-entity.ts | Introduces QuotedReplyEntity and nested quoted reply data model. |
| packages/api/src/models/entity/index.ts | Exposes QuotedReplyEntity via the Entity union and exports. |
| packages/api/src/activities/message/message.ts | Adds getQuotedMessages() and addQuotedReply() builder API. |
| packages/api/src/activities/message/message.spec.ts | Adds unit tests for quoted-reply parsing and builder behavior. |
| packages/api/src/activities/activity.ts | Removes withReplyToId() builder method. |
| packages/api/src/activities/activity.spec.ts | Updates tests to reflect removal of withReplyToId(). |
| package-lock.json | Adds the new @examples/quoted-replies workspace entry. |
| examples/quoted-replies/** | New runnable example demonstrating reading/sending quoted replies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 8 commits
March 24, 2026 16:09
a85cefa to
1036764
Compare
heyitsaamir
reviewed
Mar 25, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
heyitsaamir
reviewed
Mar 25, 2026
heyitsaamir
previously approved these changes
Mar 26, 2026
heyitsaamir
approved these changes
Mar 26, 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.
withReplyToId():replyToIdbody property has no effect on threading (APX only uses it for encryption)QuotedReplyEntitytype with nestedquotedReplydata object (messageIdrequired,senderId/senderName/preview/time/isReplyDeleted/validatedMessageReferenceoptional)getQuotedMessages()onMessageActivityto read inbound quoted reply entitiesaddQuotedReply(messageId, response?)builder onMessageActivityfor constructing outbound quotes (build order = reading order)eply()to stampquotedReplyentity+ <quoted messageId="..."/>placeholder instead of blockquote HTML; removereplyToIdassignmentquoteReply(messageId, activity)onActivityContextfor quoting arbitrary messages@experimentalActivityContextconstructor whereObject.assign(this, rest)ran beforeMessageActivity.from().toInterface(), causing interface methods (getQuotedMessages,stripMentionsText,isRecipientMentioned,getAccountMention) to be missing oncontext.activity. Added regression test.