我在 Botframework 中开发了一个机器人并添加了 Microsoft Teams 频道。
当用户在 MS-Teams 中向聊天机器人写入“hi”时,我的 webhook 会收到以下消息:
{
"text": "hi",
"textFormat": "plain",
"type": "message",
"timestamp": "2017-05-18T10:05:07.742Z",
"id": "1495101906391",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/emea-client-ss.msg/",
"from": {
"id": "29:1hyY0WDlv1ehVaSqIA-anqB9CMHoukm59yNjxcVxjTnb5s2B1_HtUI6GFmS1vC6w2XufYPX7L03xlY1qEEQtT2w",
"name": "xxx"
},
"conversation": {
"id": "a:1ivnXQ6qsiT1hLo26tk4vL1vgUcanbkRm3mMsDj48HkQSKFwr87HCKUFvFoSqjMdGICUBYzds5MR1_kIBCJRY0GZyZ9fa3Yd3MXmlHUhLVA7XaXezOO5u7CaLTNghSiEM"
},
"recipient": {
"id": "28:4faa7ac7-bb35-4737-b49a-e21bbc3fb65d",
"name": "xxx"
},
"entities": [
{
"locale": "it-IT",
"country": "IT",
"platform": "Mac",
"type": "clientInfo"
}
],
"channelData": {
"tenant": {
"id": "5cf8dc9b-6f57-4eff-a404-5518dc1826d6"
}
}
}
与身体:
{
"action": "message",
"channelData": {
"tenant": {
"id": "5cf8dc9b-6f57-4eff-a404-5518dc1826d6"
}
},
"channelId": "msteams",
"conversation": {
"id": "a:1ivnXQ6qsiT1hLo26tk4vL1vgUcanbkRm3mMsDj48HkQSKFwr87HCKUFvFoSqjMdGICUBYzds5MR1_kIBCJRY0GZyZ9fa3Yd3MXmlHUhLVA7XaXezOO5u7CaLTNghSiEM"
},
"entities": [
{
"locale": "it-IT",
"country": "IT",
"platform": "Mac",
"type": "clientInfo"
}
],
"from": {
"id": "28:4faa7ac7-bb35-4737-b49a-e21bbc3fb65d",
"name": "XXX"
},
"id": "14950405460679",
"replyToId": "1495040546067",
"inputHint": "ignoringInput",
"locale": "it-IT",
"localTimestamp": "2017-05-17T17:02:25.716Z",
"recipient": {
"id": "29:1hyY0WDlv1ehVaSqIA-anqB9CMHoukm59yNjxcVxjTnb5s2B1_HtUI6GFmS1vC6w2XufYPX7L03xlY1qEEQtT2w",
"name": "XXX"
},
"serviceUrl": "https://smba.trafficmanager.net/emea-client-ss.msg/",
"text": "hi Antonio",
"textFormat": "markdown",
"type": "message",
"timestamp": "2017-05-19T17:02:25.716Z"
}
我收到以下正文的 400 错误
{
"error": {
"code": "ServiceError",
"message": "Unsupported conversation type"
}
}
回复消息有什么问题?端点和主体是否正确?
提前致谢