Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Add the following line into the ***ConfigureServices*** method within your Start

```

## Sending WhatsApp Sticker Sample Code (This will be added soon)
## Sending WhatsApp Sticker Sample Code
```csharp
var reply = MessageFactory.Text("WhatsApp Sticker");
Attachment attachment = new Attachment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,19 @@ private IActivity ConvertMessageToMessageActivity(MessageBirdWebhookPayload resp
};
break;
}
//this will be addes as soon as MessageBird nuget package add support for this message type, my PR is waiting to be merged
//case "whatsappsticker":
// {
// activity.Attachments = new List<Attachment>
// {
// new Attachment
// {
// ContentType = "whatsappSticker",
// ContentUrl = response.message.content.WhatsAppSticker.Link,
// Name = ""
// }
// };
// break;
// }
case "whatsappsticker":
{
activity.Attachments = new List<Attachment>
{
new Attachment
{
ContentType = "whatsappSticker",
ContentUrl = response.message.content.WhatsAppSticker.Link,
Name = ""
}
};
break;
}
default:
{
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ private static void HandleAttachments(IMessageActivity activity, ICollection<Mes
message.conversationMessageRequest.Type = ContentType.Audio;
break;
}
//case "whatsappsticker":
// {
// message.conversationMessageRequest.Content = new Content()
// {
// File = new WhatsAppStickerContent(
// {
// Link = attachment.ContentUrl
// }
// };
// message.conversationMessageRequest.Type = ContentType.WhatsAppSticker;
// break;
// }
case "whatsappsticker":
{
message.conversationMessageRequest.Content = new Content()
{
File = new WhatsAppStickerContent
{
Link = attachment.ContentUrl
}
};
message.conversationMessageRequest.Type = ContentType.WhatsAppSticker;
break;
}
default:
{
message.conversationMessageRequest.Content = new Content()
Expand Down