我正在研究 MS Bot Framework 与 UCMA(Skype For Business OnPremise aka SFB onPrimise)SDK 的集成。我正在使用直达通道进行连接,并且在两者之间成功建立了连接,但是当对话框提示是,没有选项从 BOT 返回到 SFB 时,并且当我将答案发送为是时,BOT 不会将其识别为我的答案. 它为每条语句创建新的对话 ID。如何克服这个问题?
以下是我来自 UCMA 的代码
static DirectLineClient client = null;
client = new Microsoft.Bot.Connector.DirectLine.DirectLineClient("DirectLineSecretKey");
botConversation = client.Conversations.NewConversation();
string message = e.TextBody;
Microsoft.Bot.Connector.DirectLine.Models.Message msg = new Microsoft.Bot.Connector.DirectLine.Models.Message
{
FromProperty = "AMOL",
Text = message
};
await client.Conversations.PostMessageAsync(botConversation.ConversationId, msg);
var messages = await client.Conversations.GetMessagesAsync(botConversation.ConversationId, watermark);
InstantMessagingFlow instantMessagingFlow = (InstantMessagingFlow)sender;
watermark = messages.Watermark;
foreach (var m in messages.Messages)
{
if (m.FromProperty != "AMOL")
instantMessagingFlow.BeginSendInstantMessage(m.Text, MyMethod, instantMessagingFlow);
}