I'm building a Bot Framework bot which is connected to the GroupMe channel. According to the (non Bot Framework specific) GroupMe Bot tutorial, GroupMe supports bots sending Image or Location attachments, by sending a message with the following syntax:
{ "bot_id" : "j5abcdefg", "text" : "Hello world", "attachments" : [ { "type" : "image", "url" : "https://i.groupme.com/somethingsomething.large" } ] }
Or:
{ "bot_id" : "j5abcdefg", "text" : "Hello world", "attachments" : [ { "type" : "location", "lng" : "40.000", "lat" : "70.000", "name" : "GroupMe HQ" } ] }
I'm trying to figure out how to send a message from the Bot Framework which will map to this attachment format on the GroupMe end, after processing by the Bot Connector. I've tried the following code:
var attachment = new Attachment();
attachment.Content = new
{
type = "location",
lng = 70.000,
lat = 40.000,
name = "GroupMe HQ"
};
await turnContext.SendActivityAsync(MessageFactory.Attachment(attachment, "Here's the location:"));
However, the attachment does not appear to be present when the message is received in the GroupMe chat. Is there any supported way to send these attachments from the Bot Framework SDK?