Skip to content

Commit

Permalink
Update SDK to 4.12 (#372)
Browse files Browse the repository at this point in the history
* Update SDK to 4.12 (#371)
  • Loading branch information
garypretty authored Mar 16, 2021
1 parent cb8ac6e commit 4fa4de7
Show file tree
Hide file tree
Showing 23 changed files with 328 additions and 665 deletions.
13 changes: 11 additions & 2 deletions Bot.Builder.Community.sln
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Adapt
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Adapters.Infobip.WhatsApp.Tests", "tests\Bot.Builder.Community.Adapters.Infobip.WhatsApp.Tests\Bot.Builder.Community.Adapters.Infobip.WhatsApp.Tests.csproj", "{E8FAA9DA-D193-466D-896C-D053AC5CD154}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Dialogs.CustomInput", "libraries\Bot.Builder.Community.Dialogs.CustomAction\Bot.Builder.Community.Dialogs.CustomInput.csproj", "{D586DAC3-D231-43B8-82F4-D2F225AC9668}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - NuGet Packages|Any CPU = Debug - NuGet Packages|Any CPU
Expand Down Expand Up @@ -513,6 +515,14 @@ Global
{E8FAA9DA-D193-466D-896C-D053AC5CD154}.Documentation|Any CPU.Build.0 = Debug|Any CPU
{E8FAA9DA-D193-466D-896C-D053AC5CD154}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8FAA9DA-D193-466D-896C-D053AC5CD154}.Release|Any CPU.Build.0 = Release|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Debug - NuGet Packages|Any CPU.ActiveCfg = Debug|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Debug - NuGet Packages|Any CPU.Build.0 = Debug|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Documentation|Any CPU.Build.0 = Debug|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D586DAC3-D231-43B8-82F4-D2F225AC9668}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -555,8 +565,6 @@ Global
{895AE009-325A-4BDF-B0F7-7F5275744D22} = {840D4038-9AB8-4750-9FFE-365386CE47E2}
{DA1A84A1-D921-412F-A855-93FC9A525D27} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{7856219A-3537-4F81-86A8-4CB020BD2B9A} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{DA1A84A1-D921-412F-A855-93FC9A525D27} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{7856219A-3537-4F81-86A8-4CB020BD2B9A} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{58EF2CAF-5B27-476B-A9C7-BB6A8D8B470B} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{22EBD054-1CBC-4832-9D90-4F243570CB54} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{87220934-70D0-4BE7-8ED3-C403281CCCFD} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
Expand All @@ -573,6 +581,7 @@ Global
{DE1D7A6A-8018-4375-8118-98A72EE5505A} = {840D4038-9AB8-4750-9FFE-365386CE47E2}
{B9347740-E245-4B13-8BA8-222C27522E82} = {840D4038-9AB8-4750-9FFE-365386CE47E2}
{E8FAA9DA-D193-466D-896C-D053AC5CD154} = {840D4038-9AB8-4750-9FFE-365386CE47E2}
{D586DAC3-D231-43B8-82F4-D2F225AC9668} = {08759E28-8592-4EBA-9A07-19A5BED3FB0C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9FE3B75E-BA2B-45BC-BBF0-DDA8BA10C4F0}
Expand Down
2 changes: 1 addition & 1 deletion CommonTargets/library.shared.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Bot_Builder_Version>4.11.1</Bot_Builder_Version>
<Bot_Builder_Version>4.12.1</Bot_Builder_Version>
</PropertyGroup>

</Project>
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://dev.azure.com/BotBuilder-Community/dotnet/_apis/build/status/BotBuilderCommunity.botbuilder-community-dotnet?branchName=master)](https://dev.azure.com/BotBuilder-Community/dotnet/_build/latest?definitionId=1&branchName=master) [![Bot Builder Community NuGet](https://img.shields.io/badge/NuGet-blue.svg)](https://www.nuget.org/profiles/BotBuilderCommunity)

**Latest release: v4.9.1 (07/03/2020) - [Release Notes](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/releases/tag/v4.9.1)**
**Latest release: v4.11.0 (02/17/2021) - [Release Notes](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/releases/tag/v4.11)**

# Bot Builder Community - .NET Extensions

Expand All @@ -12,6 +12,7 @@ To see a list of current extensions available for the Bot Builder .NET SDK, use
- [Contributing and Reporting Issues](#contributing-and-reporting-issues)
- [Adapters](#adapters)
- [Dialogs and Prompts](#dialogs-and-prompts)
- [Cards](#cards)
- [Middleware](#middleware)
- [Recognizers](#recognizers)
- [Storage](#storage)
Expand Down Expand Up @@ -55,6 +56,15 @@ The following dialogs are currently available;
| [Bot Builder v4 Luis Dialog](libraries/Bot.Builder.Community.Dialogs.Luis) | An implementation for v4 of the Bot Builder .NET SDK of the [Microsoft.Bot.Builder.Dialogs.LuisDialog built for Bot Builder V3](https://github.com/microsoft/BotBuilder-V3/tree/master/CSharp/Library/Microsoft.Bot.Builder/Luis) A dialog specialized to handle intents and entities from LUIS. | [Sample](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/samples/Luis%20Dialog%20Sample) | [![NuGet version](https://img.shields.io/badge/NuGet-blue.svg)](https://www.nuget.org/packages/Bot.Builder.Community.Dialogs.Luis/) |
| [Adaptive Dialogs - REST](libraries/Bot.Builder.Community.Dialogs.Adaptive.Rest) | Adaptive package containing additional actions to make calling REST endpoints easier when using Adaptive dialogs | | [![NuGet version](https://img.shields.io/badge/NuGet-blue.svg)](https://www.nuget.org/packages/Bot.Builder.Community.Dialogs.Adaptive.Rest/) |

## Cards

Packages that assist in building bots using Adaptive Cards and Bot Framework Cards;

| Name | Description | Sample? | NuGet |
| ------ | ------ | ------ | ------ |
| [Cards Library](libraries/Bot.Builder.Community.Cards) | The cards library currently has two main features - Both Adaptive Cards and Bot Framework cards can be disabled and Adaptive Cards can be translated | | [![NuGet version](https://img.shields.io/badge/NuGet-blue.svg)](https://www.nuget.org/packages/Bot.Builder.Community.Middleware.HandleActivityType/) |
| [Adaptive Card Prompt](libraries/Bot.Builder.Community.Dialogs.Prompts) | This prompt is available as part of the Bot.Builder.Community.Prompts package. It includes validation for specified required input fields, displays a custom message if user replies via text and not card input and ensures input is only valid if it comes from the appropriate card (not one shown previous to prompt).| | [![NuGet version](https://img.shields.io/badge/NuGet-blue.svg)](https://www.nuget.org/packages/Bot.Builder.Community.Prompts/) |

## Middleware

The following pieces of middleware are currently available;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)../', 'Bot.Builder.Community.sln'))\CommonTargets\library.shared.targets" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Core package containing request / response mapper, and helper methods for when using Bot Builder .NET ACS Adapter.</Description>
<RepositoryUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/</RepositoryUrl>
<Authors>Gary Pretty</Authors>
<Company>Bot Builder Community</Company>
<PackageLicenseUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Adapters.ACS.SMS.Core</PackageProjectUrl>
<Version>1.0.0</Version>
<FileVersion>1.0.0</FileVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Communication.Sms" Version="1.0.0-beta.1" />
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Microsoft.Bot.Schema" Version="4.9.2" />
<PackageReference Include="Microsoft.Bot.Schema" Version="$(Bot_Builder_Version)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Company>Bot Builder Community</Company>
<PackageLicenseUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Adapters.ACS.SMS</PackageProjectUrl>
<Version>1.0.0</Version>
<Version>1.0.0</Version>
<FileVersion>1.0.0</FileVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
<RepositoryUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion libraries/Bot.Builder.Community.Adapters.ACS.SMS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Install into your project use the following command in the package manager.

## Sample

Sample bot is available [here](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/samples/ACS%20SMS%20Adapter%20Sample).
Sample bot is available [here](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/develop/samples/ACS%20SMS%20Adapter%20Sample).

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<PackageTags>microsoft;bot;adapter;infobip;sms;botframework;botbuilder;bots</PackageTags>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Adapters.Infobip.Sms</PackageProjectUrl>
<Description>Adapter for v4 of the Bot Builder .NET SDK for connecting bots with Infobip SMS communication channel.</Description>
<RepositoryUrl>
https://www.github.com/botbuildercommunity/botbuildercommunity-dotnet
</RepositoryUrl>
<RepositoryUrl>https://www.github.com/botbuildercommunity/botbuildercommunity-dotnet</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)../', 'Bot.Builder.Community.sln'))\CommonTargets\library.shared.targets" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageTags>microsoft;bot;adapter;infobip;viber;botframework;botbuilder;bots</PackageTags>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Adapters.Infobip.Viber</PackageProjectUrl>
<Description>Adapter for v4 of the Bot Builder .NET SDK for connecting bots with Viber.</Description>
<RepositoryUrl>https://www.github.com/botbuildercommunity/botbuildercommunity-dotnet</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Adapter for v4 of the Bot Builder .NET SDK for connecting bots with Infobip WhatsApp communication channel.</Description>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Adapters.Infobip.WhatsApp</PackageProjectUrl>
<RepositoryUrl>http://www.github.com/botbuildercommunity/botbuildercommunity-dotnet
</RepositoryUrl>
<RepositoryUrl>http://www.github.com/botbuildercommunity/botbuildercommunity-dotnet</RepositoryUrl>
<PackageTags>microsoft;bot;adapter;infobip;whatsapp;botframework;botbuilder;bots</PackageTags>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)../', 'Bot.Builder.Community.sln'))\CommonTargets\library.shared.targets" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageTags>microsoft;bot;adapter;infobip;sms;botframework;botbuilder;bots</PackageTags>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Adapters.Infobip.MessageBird</PackageProjectUrl>
<Description>Adapter for v4 of the Bot Builder .NET SDK to allow for a bot to be used for WhatsApp channel with MessageBird C# SDK.</Description>
<RepositoryUrl>https://www.github.com/botbuildercommunity/botbuildercommunity-dotnet</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MessageBird" Version="2.1.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.10.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="$(Bot_Builder_Version)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)../', 'Bot.Builder.Community.sln'))\CommonTargets\library.shared.targets" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.0.1</Version>
<Authors>Kyle Delaney</Authors>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Cards</PackageProjectUrl>
<RepositoryUrl>http://www.github.com/botbuildercommunity/botbuildercommunity-dotnet
</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
39 changes: 0 additions & 39 deletions libraries/Bot.Builder.Community.Cards/Management/CardManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,45 +191,6 @@ public async Task UnsaveActivityAsync(ITurnContext turnContext, string activityI
await StateAccessor.SetAsync(turnContext, state, cancellationToken).ConfigureAwait(false);
}

// TODO: Incorporate value preservation into other updates made to Adaptive Cards
public async Task PreserveValuesAsync(ITurnContext turnContext, CancellationToken cancellationToken = default)
{
BotAssert.ContextNotNull(turnContext);

if (turnContext.GetIncomingActionData() is JObject data)
{
var matchResult = await GetDataMatchAsync(turnContext, cancellationToken).ConfigureAwait(false);

if (matchResult.SavedActivity != null
&& matchResult.SavedAttachment?.ContentType.EqualsCI(ContentTypes.AdaptiveCard) == true)
{
var changed = false;

// The content must be non-null or else the attachment couldn't have been a match
matchResult.SavedAttachment.Content = matchResult.SavedAttachment.Content.ToJObjectAndBack(
card =>
{
// Iterate through all inputs in the card
foreach (var input in AdaptiveCardUtil.GetAdaptiveInputs(card))
{
var id = AdaptiveCardUtil.GetAdaptiveInputId(input);
var inputValue = data.GetValue(id);
input.SetValue(AdaptiveProperties.Value, inputValue);
changed = true;
}
});

if (changed)
{
// The changes to the attachment will already be reflected in the activity
await UpdateActivityAsync(turnContext, matchResult.SavedActivity, cancellationToken).ConfigureAwait(false);
}
}
}
}

public async Task DeleteActionSourceAsync(ITurnContext turnContext, string dataIdScope, CancellationToken cancellationToken = default)
{
// TODO: Provide a way to delete elements by specifying an ID that's not in the incoming action data
Expand Down
Loading

0 comments on commit 4fa4de7

Please sign in to comment.