【发布时间】:2017-08-14 02:18:19
【问题描述】:
我想在有人连接到我的机器人时显示欢迎消息。我使用了 github (https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/demo-ContosoFlowers) 上的 demo-ContosoFlowers 示例中的技术,该技术在 Bot Framework Emulator 中运行良好,但在 Skype 或 Facebook Messenger 中却不行。具体来说,MessageController.HandleSystemMessage 中的这段代码不会触发:
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);
}
}
有人知道如何正确执行此操作吗?
【问题讨论】:
标签: c# botframework