Sample: opt targeted-messages example into slash commands#583
Merged
Conversation
Adds the devPreview manifest fields per the slash-commands docs spec (microsoft/teams-sdk#2843, MicrosoftDocs/msteams-docs#14182): - bots[].supportsTargetedMessages: true - bots[].commandLists[].triggers: ["slash"] Switches \$schema/manifestVersion to devPreview since v1.20 doesn't define these fields yet. Adds a `test inbound` handler that demonstrates `activity.recipient.isTargeted` detection (the signal slash commands arrive with). README documents the new fields and handler.
97f81e1 to
2cedb9a
Compare
MehakBindra
approved these changes
May 20, 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.
Updates the
targeted-messagesexample manifest to opt into slash commands per the docs spec (microsoft/teams-sdk#2843, MicrosoftDocs/msteams-docs#14182), and adds a handler that demonstrates how slash commands surface to the bot.Changes
examples/targeted-messages/appPackage/manifest.json:$schemaandmanifestVersiontodevPreview(the slash-commands opt-in fields are only defined in the devPreview schema today).bots[].supportsTargetedMessages: trueto opt the bot into receiving slash-command-style targeted messages.bots[].commandLists[].triggers: ["slash"]declaringtest send/test update/test delete/test public/test inboundas slash commands surfaced in the Teams/picker (scoped toteamandgroupChat).examples/targeted-messages/src/index.ts— newtest inboundhandler that readsactivity.recipient?.isTargetedand reports whether the inbound message was delivered as a targeted message (the signal slash commands arrive with).examples/targeted-messages/README.md— refreshed commands table, new "Manifest configuration" section documenting the new fields.Test plan
npx turbo build --filter=@examples/targeted-messagescleanexamples/targeted-messages/appPackage/manifest.jsonvalidates against the Teams devPreview schema (placeholder${{...}}tokens excepted)test inboundhandler verified live in Teams: broadcast branch fires when the inbound is not targeted (the targeted branch will fire once slash commands start delivering withrecipient.isTargeted = true)🤖 Generated with Claude Code