Make messaging endpoint path configurable#323
Merged
heyitsaamir merged 3 commits intomainfrom Mar 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the Teams messaging endpoint path configurable across the Python SDK, replacing the previously hardcoded /api/messages route with an AppOptions.messaging_endpoint option (defaulting to /api/messages). This aligns the Python implementation with the referenced teams.ts change and ensures plugins (notably BotBuilder) follow the configured server route.
Changes:
- Added
messaging_endpointtoAppOptions/InternalAppOptionswith default/api/messages. - Updated
Appto pass the configuredmessaging_endpointintoHttpServer. - Updated
HttpServerandBotBuilderPluginroute registration to use the configured endpoint; added tests for default/custom endpoints.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/botbuilder/src/microsoft_teams/botbuilder/botbuilder_plugin.py | Registers BotBuilder activity route using http_server.messaging_endpoint instead of hardcoding /api/messages. |
| packages/apps/tests/test_http_server.py | Adds tests for default and custom messaging endpoint registration behavior. |
| packages/apps/src/microsoft_teams/apps/options.py | Introduces messaging_endpoint option and internal default. |
| packages/apps/src/microsoft_teams/apps/http/http_server.py | Accepts/stores messaging_endpoint, exposes it via a property, and registers the route dynamically. |
| packages/apps/src/microsoft_teams/apps/app.py | Constructs HttpServer with the configured messaging endpoint and updates related comments. |
lilyydu
approved these changes
Mar 24, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7c5ce8c to
f96412f
Compare
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.
Summary
/api/messagesis hardcoded as the messaging endpoint path. This might not be always what a developer wants.messaging_endpointoption toAppOptions(defaults to/api/messages)Appis the source of truth for the default;HttpServerrequires it explicitlyBotBuilderPluginreads the path fromhttp_server.messaging_endpointinstead of hardcodingPort of microsoft/teams.ts#483
Test plan
test_http_server.pytests pass🤖 Generated with Claude Code