Require explicit serviceUrl for Core activity APIs#601
Open
heyitsaamir wants to merge 3 commits into
Open
Conversation
Make Core ConversationClient activity operations take an explicit serviceUrl instead of deriving routing information from CoreActivity.ServiceUrl. Update app, BotBuilder, streaming, tests, and samples to pass service URLs explicitly without mutating outbound activities for routing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Make Core
ConversationClientactivity operations take an explicitUri serviceUrlinstead of deriving it fromCoreActivity.ServiceUrl.This unifies the pattern across Core, Compat, TeamsApps, and the other language SDKs. It removes the awkward behavior where some APIs derived routing information from
CoreActivity, while others required it explicitly. Values likeserviceUrlcome from the inbound activity and act as SDK signals for which URL to call for the outbound request; they are not meant to be properties of the outbound activity itself.Changes
SendActivityAsync,UpdateActivityAsync,UpdateTargetedActivityAsync, andDeleteActivityAsync(string, CoreActivity, ...)to requireserviceUrl.ServiceUrlin app/API/BotBuilder wrapper paths.This PR includes breaking changes in Core. Since Core is still in preview, we believe this is the right time to make the change.
Validation
dotnet test core/test/Microsoft.Teams.Core.UnitTests/Microsoft.Teams.Core.UnitTests.csprojdotnet test core/test/Microsoft.Teams.Apps.UnitTests/Microsoft.Teams.Apps.UnitTests.csprojdotnet test core/test/Microsoft.Teams.Apps.BotBuilder.UnitTests/Microsoft.Teams.Apps.BotBuilder.UnitTests.csprojdotnet build Microsoft.Teams.sln --no-restore --verbosity minimal