Repository navigation
[fix]: add optional serviceUrl to send options - #993
Alex Acebo (aacebo) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 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.serviceUrlforApp.send()and both forms ofApp.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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
for the docs PR from Adrian: "Please remember to update the version requirement in the doc."
Corina (corinagum)
left a comment
There was a problem hiding this comment.
LGTM! Would you mind adding a compatibility impact summary to the PR summary?

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