Skip to content

[fix]: add optional serviceUrl to send options - #993

Open
Alex Acebo (aacebo) wants to merge 1 commit into
mainfrom
aacebo/proactive-service-url-override
Open

Alex Acebo (aacebo) wants to merge 1 commit into
mainfrom
aacebo/proactive-service-url-override

Conversation

@aacebo

Copy link
Copy Markdown
Collaborator

adds an optional serviceUrl to the AppSendOptions mirroring what we today support in the python/net versions of the SDK.

Copilot AI balanced review requested due to automatic review settings November 18, 2026 18:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The PR description lacks a prominent Public API change section identifying the affected send/reply APIs, intended Python/.NET parity, and backward compatibility when serviceUrl is omitted or undefined.

1 open issue
What changed in this PR

Adds per-call service URL overrides for proactive messaging in @microsoft/teams.apps, matching the Python and .NET SDKs while preserving the configured URL by default.

Changes:

  • Public API change: Adds optional AppSendOptions.serviceUrl for App.send() and both forms of App.reply(); existing callers require no migration.
  • Adds tests for routing, fallback behavior, overlapping calls, and combining service URL and identity overrides.
  • Documents the option and updates context-method guidance.
File Description
packages/​apps/​src/​contexts/​activity.ts Updates comments describing proactive service URL selection.
packages/​apps/​src/​app.ts Applies the per-call URL override and documents method options.
packages/​apps/​src/​app.spec.ts Tests override routing, fallback, and call isolation.
packages/​apps/​src/​app.options.ts Defines and documents the optional serviceUrl field.
packages/​apps/​README.md Adds proactive send and reply examples with URL overrides.

Review effort: Balanced

* Omit or use `undefined` to use the app's configured service URL.
* Does not change the app's API client or the URL used by other calls.
*/
readonly serviceUrl?: string;
* @param conversationRef conversation reference to send to
* @deprecated Passing a `DeprecatedInputActivity` is deprecated. Use MessageActivityInput or TypingActivityInput instead.
* Passing a conversation reference is also deprecated and will be removed in a future release. Use `App.send()` to send to a different conversation.
* `App.send()` sends through the `serviceUrl` the app is configured with, unlike the context methods, which use the `serviceUrl` of the conversation reference (by default, the inbound activity's).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we update the docs and relevant samples as well so that we can compare this PR to what we're saying in the docs? Of course, this PR will have to go in first, then release and then the docs update will get published, right?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the docs PR from Adrian: "Please remember to update the version requirement in the doc."

@corinagum Corina (corinagum) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Would you mind adding a compatibility impact summary to the PR summary?

This branch has not been deployed

No deployments
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.

4 participants