diff --git a/Bot.Builder.Community.sln b/Bot.Builder.Community.sln
index 15853710..0e3583bc 100644
--- a/Bot.Builder.Community.sln
+++ b/Bot.Builder.Community.sln
@@ -165,6 +165,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Compo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Components.Trigger.ExpireConversation", "libraries\Bot.Builder.Community.Components.Trigger.ExpireConversation\Bot.Builder.Community.Components.Trigger.ExpireConversation.csproj", "{53DD5870-58AC-4B4E-9C12-16AA218EBFCE}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Components.Adapters.MessageBird", "libraries\Bot.Builder.Community.Components.Adapters.MessageBird\Bot.Builder.Community.Components.Adapters.MessageBird.csproj", "{E438DC4C-670F-496A-AAB3-C800C78E0532}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Adapters.Facebook", "libraries\Bot.Builder.Community.Adapters.Facebook\Bot.Builder.Community.Adapters.Facebook.csproj", "{4DE48D05-D466-4AFA-861C-D1F72A0ADB90}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot.Builder.Community.Adapters.Slack", "libraries\Bot.Builder.Community.Adapters.Slack\Bot.Builder.Community.Adapters.Slack.csproj", "{E449DA9D-62D9-474A-8C0A-6D0B7324D247}"
@@ -731,6 +733,14 @@ Global
{53DD5870-58AC-4B4E-9C12-16AA218EBFCE}.Documentation|Any CPU.Build.0 = Debug|Any CPU
{53DD5870-58AC-4B4E-9C12-16AA218EBFCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53DD5870-58AC-4B4E-9C12-16AA218EBFCE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Debug - NuGet Packages|Any CPU.ActiveCfg = Debug|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Debug - NuGet Packages|Any CPU.Build.0 = Debug|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Documentation|Any CPU.Build.0 = Debug|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E438DC4C-670F-496A-AAB3-C800C78E0532}.Release|Any CPU.Build.0 = Release|Any CPU
{4DE48D05-D466-4AFA-861C-D1F72A0ADB90}.Debug - NuGet Packages|Any CPU.ActiveCfg = Debug|Any CPU
{4DE48D05-D466-4AFA-861C-D1F72A0ADB90}.Debug - NuGet Packages|Any CPU.Build.0 = Debug|Any CPU
{4DE48D05-D466-4AFA-861C-D1F72A0ADB90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -874,6 +884,7 @@ Global
{55546728-AADE-4ED0-88AD-B517B915CD5D} = {1F7F4CAF-CF22-491F-840D-A63835726C12}
{56A89D8F-2CD5-439B-8E04-A7A6D9C7566C} = {1F7F4CAF-CF22-491F-840D-A63835726C12}
{53DD5870-58AC-4B4E-9C12-16AA218EBFCE} = {1F7F4CAF-CF22-491F-840D-A63835726C12}
+ {E438DC4C-670F-496A-AAB3-C800C78E0532} = {1F7F4CAF-CF22-491F-840D-A63835726C12}
{4DE48D05-D466-4AFA-861C-D1F72A0ADB90} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{E449DA9D-62D9-474A-8C0A-6D0B7324D247} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
{8CBD9940-772C-495F-A54E-1B364C4774E2} = {BF310E8A-8DA1-441F-90E9-DE0E66553048}
diff --git a/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapter.cs b/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapter.cs
index fb3445a5..bbdd9266 100644
--- a/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapter.cs
+++ b/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapter.cs
@@ -37,7 +37,7 @@ public class MessageBirdAdapter : BotAdapter, IBotFrameworkHttpAdapter
public MessageBirdAdapter(MessageBirdAdapterOptions options = null, ILogger logger = null)
{
- _options = options ?? throw new ArgumentNullException(nameof(options));
+ _options = options ?? new MessageBirdAdapterOptions();
_logger = logger ?? NullLogger.Instance;
if (_options.UseWhatsAppSandbox)
@@ -50,7 +50,9 @@ public MessageBirdAdapter(MessageBirdAdapterOptions options = null, ILogger logg
}
_requestAuthorization = new MessageBirdRequestAuthorization();
}
+
Client _messageBirdClient;
+
public async Task ProcessAsync(HttpRequest httpRequest, HttpResponse httpResponse, IBot bot, CancellationToken cancellationToken = default)
{
if (httpRequest == null)
diff --git a/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapterOptions.cs b/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapterOptions.cs
index 189c0679..6b3a9ae4 100644
--- a/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapterOptions.cs
+++ b/libraries/Bot.Builder.Community.Adapters.MessageBird/MessageBirdAdapterOptions.cs
@@ -1,12 +1,14 @@
using Microsoft.Extensions.Configuration;
using System;
-using System.Collections.Generic;
-using System.Text;
namespace Bot.Builder.Community.Adapters.MessageBird
{
public class MessageBirdAdapterOptions
{
+ public MessageBirdAdapterOptions()
+ {
+
+ }
public MessageBirdAdapterOptions(IConfiguration configuration)
: this(configuration["MessageBirdAccessKey"], configuration["MessageBirdSigningKey"], Convert.ToBoolean(configuration["MessageBirdUseWhatsAppSandbox"]))
{ }
@@ -17,8 +19,11 @@ public MessageBirdAdapterOptions(string accessKey, string signingKey, bool useWh
SigningKey = signingKey;
UseWhatsAppSandbox = useWhatsAppSandbox;
}
+
public string AccessKey { get; set; }
+
public string SigningKey { get; set; }
+
public bool UseWhatsAppSandbox { get; set; }
}
}
diff --git a/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Bot.Builder.Community.Components.Adapters.MessageBird.csproj b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Bot.Builder.Community.Components.Adapters.MessageBird.csproj
new file mode 100644
index 00000000..408ba6e7
--- /dev/null
+++ b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Bot.Builder.Community.Components.Adapters.MessageBird.csproj
@@ -0,0 +1,49 @@
+
+
+
+
+ netstandard2.0
+ Adapter component for v4 of the Bot Builder .NET SDK to allow for a bot to be used with MessageBird whatsapp.
+ Bot Builder Community
+ Bot Builder Community
+ https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/blob/master/LICENSE
+ https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/master/libraries/Bot.Builder.Community.Components.Adapters.MessageBird
+ 1.0.0
+ 1.0.0
+ 1.0.0
+ package-icon.png
+ https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/
+ true
+ content
+ bots;ai;botframework;botbuilder;msbot-component;msbot-adapter
+ $(NoWarn);NU5104
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
diff --git a/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/MessageBirdBotComponent.cs b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/MessageBirdBotComponent.cs
new file mode 100644
index 00000000..ca870e6c
--- /dev/null
+++ b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/MessageBirdBotComponent.cs
@@ -0,0 +1,11 @@
+using Bot.Builder.Community.Adapters.MessageBird;
+using Bot.Builder.Community.Components.Shared.Adapters;
+
+namespace Bot.Builder.Community.Components.Adapters.MessageBird
+{
+ public class MessageBirdBotComponent :
+ AdapterBotComponent
+ {
+
+ }
+}
diff --git a/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/README.md b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/README.md
new file mode 100644
index 00000000..ab369e03
--- /dev/null
+++ b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/README.md
@@ -0,0 +1,55 @@
+# Unofficial MessageBird WhatsApp Adapter for Bot Framework Composer
+
+
+# Description
+
+This is part of the [Bot Builder Community](https://github.com/botbuildercommunity) project which contains Bot Framework Components and other projects / packages for use with Bot Framework Composer and the Bot Builder .NET SDK v4.
+
+The MessageBird WhatsApp adapter enables receiving and sending WhatsApp messages. The MessageBird adapter allows you to add an additional endpoint to your bot for receiving WhatsApp messages. The MessageBird endpoint can be used in conjunction with other channels meaning, for example, you can have a bot exposed on out of the box channels such as Facebook and Teams, but also via an MessageBird (as well as side by side with the Google/Twitter adapters also available from the Bot Builder Community Project).
+
+
+The adapter currently supports the following scenarios:
+
+* Send/receive messages with WhatsApp Sandbox
+* Send/receive text messages
+* Send/receive media messages (document, image, video, audio) - Supported formats for media message types available [here](https://developers.facebook.com/docs/whatsapp/api/media/#supported-files)
+* Send/receive location messages
+* Verification of incoming MessageBird requests (There is one issue for delivery report webhook verification, MessageBird team is investigating.)
+* Receive delivery reports
+* Full incoming request from MessageBird is added to the incoming activity as ChannelData
+
+## Usage
+
+- [Prerequisites](#Prerequisites)
+- [Component Installation](#Component-installation-via-Composer-Package-Manager)
+- [Configure the MessageBird connection in Composer](#Configuring-the-MessageBird-connection-in-Bot-Framework-Composer)
+- [More Information](#More-Information)
+### Prerequisites
+
+- [Bot Framework Composer](https://dev.botframework.com/)
+
+## Component installation via Composer Package Manager
+
+1. Go to Package Manager (in the left hand navigation within Composer).
+
+2. Within in Package Manager, search for an install the latest version of Bot.Builder.Community.Components.Adapters.MessageBird.
+
+## Configuring the MessageBird connection in Bot Framework Composer
+
+1. In Composer, go to your project settings. Within the 'Connections' tab, there should be a new entry called `MessageBird Connection`. Select `Configure` to configure the new connection.
+
+
+
+
+2. A modal will pop up. Fill the fields with the values
+
+
+
+
+3. Once you close the modal, your connection should appear as configured in the bot settings.
+
+
+
+## More Information
+- [MessageBird](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/develop/libraries/Bot.Builder.Community.Adapters.MessageBird)
+
diff --git a/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Schemas/BotBuilderCommunity.MessageBirdAdapter.schema b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Schemas/BotBuilderCommunity.MessageBirdAdapter.schema
new file mode 100644
index 00000000..d5e0191a
--- /dev/null
+++ b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Schemas/BotBuilderCommunity.MessageBirdAdapter.schema
@@ -0,0 +1,41 @@
+{
+ "$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema",
+ "$role": "implements(Microsoft.IAdapter)",
+ "title": "MessageBird Connection",
+ "description": "Connects a bot to MessageBird WhatsApp.",
+ "type": "object",
+ "properties": {
+ "AccessKey": {
+ "type": "string",
+ "title": "Access Key",
+ "description": "Endpoint on which messages will be sent."
+ },
+ "SigningKey": {
+ "type": "string",
+ "title": "Signing Key",
+ "description": "Signing Key for requests authentication and authorization."
+ },
+ "UseWhatsAppSandbox": {
+ "type": "boolean",
+ "title": "UseWhatsAppSandbox",
+ "description": "Use WhatsApp Sandbox."
+ },
+ "route": {
+ "type": "string",
+ "title": "Route",
+ "description": "Optional route where the adapter is exposed.",
+ "default": "messagebird"
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "Adapter type.",
+ "default": "Bot.Builder.Community.Adapters.MessageBird.MessageBirdAdapter"
+ }
+ },
+ "required": [
+ "AccessKey",
+ "SigningKey",
+ "UseWhatsAppSandbox"
+ ]
+}
diff --git a/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Schemas/BotBuilderCommunity.MessageBirdAdapter.uischema b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Schemas/BotBuilderCommunity.MessageBirdAdapter.uischema
new file mode 100644
index 00000000..2aebf9e9
--- /dev/null
+++ b/libraries/Bot.Builder.Community.Components.Adapters.MessageBird/Schemas/BotBuilderCommunity.MessageBirdAdapter.uischema
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://schemas.botframework.com/schemas/ui/v1.0/ui.schema",
+ "form": {
+ "label": "MessageBirdAdapter connection",
+ "description": "Connects a bot to MessageBird whatsApp.",
+ "helpLink": "https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/blob/feature/packages-preview/libraries/Bot.Builder.Community.Adapters.Zoom/Component/README.md",
+ "order": [
+ "AccessKey",
+ "SigningKey",
+ "UseWhatsAppSandbox",
+ "*"
+ ],
+ "hidden": [
+ "type"
+ ]
+ }
+}