Skip to content

Make messaging endpoint path configurable#323

Merged
heyitsaamir merged 3 commits intomainfrom
aamirj/configurable-messaging-endpoint
Mar 24, 2026
Merged

Make messaging endpoint path configurable#323
heyitsaamir merged 3 commits intomainfrom
aamirj/configurable-messaging-endpoint

Conversation

@heyitsaamir
Copy link
Collaborator

@heyitsaamir heyitsaamir commented Mar 24, 2026

Summary

  • Currently /api/messages is hardcoded as the messaging endpoint path. This might not be always what a developer wants.
  • Adds messaging_endpoint option to AppOptions (defaults to /api/messages)
  • App is the source of truth for the default; HttpServer requires it explicitly
  • BotBuilderPlugin reads the path from http_server.messaging_endpoint instead of hardcoding

Port of microsoft/teams.ts#483

Test plan

  • Existing test_http_server.py tests pass
  • New test for default messaging endpoint value
  • New test for custom messaging endpoint registration
  • Manual test with a custom endpoint path

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings March 24, 2026 06:20
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 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_endpoint to AppOptions / InternalAppOptions with default /api/messages.
  • Updated App to pass the configured messaging_endpoint into HttpServer.
  • Updated HttpServer and BotBuilderPlugin route 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.

heyitsaamir and others added 3 commits March 24, 2026 15:53
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>
@heyitsaamir heyitsaamir force-pushed the aamirj/configurable-messaging-endpoint branch from 7c5ce8c to f96412f Compare March 24, 2026 22:55
@heyitsaamir heyitsaamir merged commit c93362d into main Mar 24, 2026
7 checks passed
@heyitsaamir heyitsaamir deleted the aamirj/configurable-messaging-endpoint branch March 24, 2026 23:03
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