Skip to content

Fix fluent API regression and documentation for WithRecipient overloads#320

Merged
rido-min merged 2 commits into
rido/fix-fluent-TMfrom
copilot/sub-pr-318
Feb 11, 2026
Merged

Fix fluent API regression and documentation for WithRecipient overloads#320
rido-min merged 2 commits into
rido/fix-fluent-TMfrom
copilot/sub-pr-318

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Addresses four issues from PR review feedback where the WithRecipient API refactoring introduced a fluent chaining regression, incorrect error messaging, and outdated documentation.

Fluent API fix:

  • Added MessageActivity.WithRecipient(Account) override returning MessageActivity to preserve fluent chaining when calling the 1-arg overload
  • Without this, new MessageActivity().WithRecipient(account) resolved to base class method and returned Activity, breaking chains like .WithRecipient(account).AddText(...)

Error message correction:

  • Updated exception in App.cs from WithRecipient(recipientId, true) to WithRecipient(new Account { Id = recipientId }, true) to reflect actual parameter types

Documentation updates:

  • Replaced remaining WithTargetedRecipient references in README comparison table with current WithRecipient API

Test coverage:

  • Added WithRecipient_MaintainsFluentChaining test that chains .AddText() after .WithRecipient() to catch future regressions

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@rido-min
rido-min marked this pull request as ready for review February 11, 2026 15:17

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • token.botframework.com
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/teams.net/teams.net/Tests/Microsoft.Teams.Apps.Tests/bin/Debug/net8.0/Microsoft.Teams.Apps.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/teams.net/teams.net/Tests/Microsoft.Teams.Apps.Tests/bin/Debug/net8.0/Microsoft.Teams.Apps.Tests.deps.json /home/REDACTED/work/teams.net/teams.net/Tests/Microsoft.Teams.Apps.Tests/bin/Debug/net8.0/testhost.dll --port 38051 --endpoint 127.0.0.1:038051 --role client --parentprocessid 4424 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/teams.net/teams.net/Tests/Microsoft.Teams.Apps.Tests/bin/Debug/net10.0/Microsoft.Teams.Apps.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/teams.net/teams.net/Tests/Microsoft.Teams.Apps.Tests/bin/Debug/net10.0/Microsoft.Teams.Apps.Tests.deps.json /home/REDACTED/work/teams.net/teams.net/Tests/Microsoft.Teams.Apps.Tests/bin/Debug/net10.0/testhost.dll --port 45259 --endpoint 127.0.0.1:045259 --role client --parentprocessid 4425 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Refactor targeted messages with overload in WithRecipient Fix fluent API regression and documentation for WithRecipient overloads Feb 11, 2026
Copilot AI requested a review from rido-min February 11, 2026 15:18
@rido-min
rido-min merged commit 77d0a9d into rido/fix-fluent-TM Feb 11, 2026
1 check passed
@rido-min
rido-min deleted the copilot/sub-pr-318 branch February 11, 2026 15:18
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.

2 participants