React native 客户端websocket由于在bot中调用builder.Prompts.text()而接收到的事件缺少活动负载 客户端websocket由于调用bot中的builder.Prompts.text()而接收到的botframework Node.js[DirectLine 3.0 API/React Native Client(Android)]事件缺少“data”属性(即活动负载)。
版本信息 React本机客户端(Android)React native 客户端websocket由于在bot中调用builder.Prompts.text()而接收到的事件缺少活动负载 客户端websocket由于调用bot中的builder.Prompts.text()而接收到的botframework Node.js[DirectLine 3.0 API/React Native Client(Android)]事件缺少“data”属性(即活动负载)。,react-native,botframework,direct-line-botframework,React Native,Botframework,Direct Line Botframework,版本信息 React本机客户端(Android) Node.js v7.5.0 反应本机v0.41.2 机器人 Node.jsv6.3.1 botbuilder v3.7.0 直达线 API v3.0 问题描述 客户端websocket由于在bot中调用builder.Prompts.text()而接收到的事件缺少“data”属性(即活动负载) 注:此事件之后的后续事件将包括符号“原始事件”,其中包括初始事件中预期的缺失事件细节 来自bot的直接线路请求(即从ChatConnecto
- Node.js v7.5.0
- 反应本机v0.41.2
- Node.jsv6.3.1
- botbuilder v3.7.0
- API v3.0
{
… // Expecting a data property at this level. Don’t confuse this with the data property in the Symbol below, which is for the previous event.
Symbol(original_event): {
data: "{
"activities": [
{
"type": "typing",
"id": "[MY CONVERSATION ID]|5ChLjtMKBEz",
"timestamp": "2017-05-04T10:37:48.3923201Z",
"channelId": "directline",
"from": {
"id": "MyBot",
"name": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
}
}
]}",
type: ”message”
},
timestamp: 1493894269211,
type: “message”
}
上述事件之后的事件包含:
{
…
Symbol(original_event): {
data: "{
"activities": [
{
"type": "message",
"id": "[MY CONVERSATION ID]|0000030",
"timestamp": "2017-05-04T10:37:49.092354Z",
"channelId": "directline",
"from": {
"id": "MyBot",
"name": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
},
"text": "Hi Pete, please enter the code displayed in the browser page to complete the sign in process.”
}
],
"watermark": "30"
}",
type: ”message”
},
timestamp: 1493894511787,
type: “message”
}
注:
•请注意,原始事件之后的事件具有我们预期的数据属性,包含在符号“原始事件”中
•如果对任何其他频道类型尝试相同的对话线程,则聊天窗口(即Skype、Slack、网络聊天等)中会显示消息“Hi-Pete,请输入浏览器页面中显示的代码以完成登录过程”。这是唯一有问题的直达电话
•问题中的消息是在用户经过身份验证并调用重定向URL后触发的主动消息。需要该消息来提示用户进行第二种形式的身份验证,在这种情况下是访问代码
•如果上述对话要求所有历史信息活动,则缺失的信息属于上述活动,即:
会话ID]/activities?水印=[初始水印]
{
"activities": [
…
{
"type": "message",
"id": "[MY CONVERSATION ID]|0000009",
"timestamp": "2017-05-04T17:48:33.0747342Z",
"channelId": "directline",
"from": {
"id": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
},
"text": "Hi Pete, please enter the code displayed in the browser page to complete the sign in process."
}
…
有什么建议吗
2017年5月5日更新
目前有两种想法,一种是与React Native捆绑的WebSocket库出现问题,另一种是我们的Direct Line WebSocket出现问题(我的一位同事今天早上将与本机IOS客户端重新测试,以确认是否存在问题)。不再是问题。Websocket事件现在似乎正在按预期进行
{
"activities": [
…
{
"type": "message",
"id": "[MY CONVERSATION ID]|0000009",
"timestamp": "2017-05-04T17:48:33.0747342Z",
"channelId": "directline",
"from": {
"id": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
},
"text": "Hi Pete, please enter the code displayed in the browser page to complete the sign in process."
}
…