I want to display a welcome message whenever someone connects to my bot. I've used the technique from the demo-ContosoFlowers sample on github (https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/demo-ContosoFlowers) which works fine in the Bot Framework Emulator, but not in Skype or Facebook Messenger. Specifically, this code in MessageController.HandleSystemMessage doesn't trigger:
else if (message.Type == ActivityTypes.ConversationUpdate)
{
if (message.MembersAdded.Any(o => o.Id == message.Recipient.Id))
{
var reply = message.CreateReply(Resources.RootDialog_Welcome_Message);
ConnectorClient connector = new ConnectorClient(new Uri(message.ServiceUrl));
await connector.Conversations.ReplyToActivityAsync(reply);
}
}
Does anyone know how to do this correctly?