botbuilder-dotnet icon indicating copy to clipboard operation
botbuilder-dotnet copied to clipboard

BotFrameworkClientImpl.PostActivityAsync() doesn't support null fromBotId and toBotId values

Open stevengum opened this issue 4 years ago • 1 comments

Version

4.13.1

Describe the bug

Anonymous Skills via null fromBotId and toBotId values was dropped in the BotFrameworkClientImpl.PostActivityAsync() method:

https://github.com/microsoft/botbuilder-dotnet/blob/57eeae891efe22c632d60907ca28533f1d86fbe5/libraries/Microsoft.Bot.Connector/Authentication/BotFrameworkClientImpl.cs#L39-L46

This is a regression based off of previous behavior in the BotFrameworkHttpClient.

Background

fromBotId and toBotId null values are supported in BotFrameworkHttpClient.PostActivityAsync() for anonymous bot scenarios.

https://github.com/microsoft/botbuilder-dotnet/blob/57eeae891efe22c632d60907ca28533f1d86fbe5/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/BotFrameworkHttpClient.cs#L183-L186

https://github.com/microsoft/botbuilder-dotnet/blob/57eeae891efe22c632d60907ca28533f1d86fbe5/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/BotFrameworkHttpClient.cs#L260-L265

Additional context

The BotFrameworkClientImpl class is used in the AdaptiveDialogBot, which is used in the Adaptive Runtime work and by extension, Composer 2.0.

However, this isn't a problem in Composer (tested w/ 2.0.0-nightly.241915.204a82) unless null values are provided for the Host's AppId or Skill's AppId in the config.

stevengum avatar May 11 '21 19:05 stevengum

Relevant code in JS: https://github.com/microsoft/botbuilder-js/pull/3698/files#diff-612cd898ceba4f30c7d406690b0a5f370a4146194cf32f8b82d43aa93dbb4723R50-R51

stevengum avatar Jun 07 '21 19:06 stevengum