我在 UCWA 的 Skype Online 版本中遇到了一些奇怪的行为。我与使用普通 Skype for Business 客户端的用户展开对话,并继续与他们来回聊天。有时,在对话过程中,我会从 UCWA 事件资源中看到看似错误的参与者添加和删除事件。
例如,我将在一个 GET 事件资源上收到参与者添加的事件。接下来,我收到一个参与者删除的事件。第三,我收到“已删除”参与者向我发送了几条消息的消息事件,有时还有更多参与者添加/删除事件。
这是我的一个日志中的一个示例:
2016-06-15 10:18:57,879 - DEBUG UcwaLib.UcwaClient-604 {
"Link": {
"Rel": "participant",
"Href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/participants/erichards@instant-tech.com"
},
"Type": "added",
"_embedded": null
}
2016-06-15 10:18:59,693 - DEBUG UcwaLib.UcwaClient-604 {
"Link": {
"Rel": "participant",
"Href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/participants/erichards@instant-tech.com"
},
"Type": "deleted",
"_embedded": null
}
2016-06-15 10:18:59,709 - DEBUG UcwaLib.UcwaClient-513 {
"Link": {
"Rel": "message",
"Href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/messaging/messages/27"
},
"Type": "completed",
"_embedded": {
"message": {
"direction": "Incoming",
"timeStamp": "2016-06-15T14:18:59.183Z",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/messaging/messages/27"
},
"contact": {
"href": "/ucwa/oauth/v1/applications/103299081195/people/erichards@instant-tech.com"
},
"participant": {
"href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/participants/erichards@instant-tech.com",
"title": "Eric Richards"
},
"messaging": {
"href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/messaging"
},
"htmlMessage": {
"href": "data:text/html;charset=utf-8,%3cspan+style%3d%22font-size%3a10pt%3bmargin-bottom%3a0pt%3bline-height%3anormal%3b%22%3easdgasqetqweytzxcvb%3c%2fspan%3e"
},
"plainMessage": {
"href": "data:text/plain;charset=utf-8,asdgasqetqweytzxcvb"
}
},
"rel": "message"
}
}
}
2016-06-15 10:19:20,919 - DEBUG UcwaLib.UcwaClient-513 {
"Link": {
"Rel": "message",
"Href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/messaging/messages/28"
},
"Type": "completed",
"_embedded": {
"message": {
"direction": "Incoming",
"timeStamp": "2016-06-15T14:19:20.904Z",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/messaging/messages/28"
},
"contact": {
"href": "/ucwa/oauth/v1/applications/103299081195/people/erichards@instant-tech.com"
},
"participant": {
"href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/participants/erichards@instant-tech.com",
"title": "Eric Richards"
},
"messaging": {
"href": "/ucwa/oauth/v1/applications/103299081195/communication/conversations/629b4136-666b-4b3d-86e1-ba789e89a555/messaging"
},
"htmlMessage": {
"href": "data:text/html;charset=utf-8,%3cspan+style%3d%22font-size%3a10pt%3bmargin-bottom%3a0pt%3bline-height%3anormal%3b%22%3easdgasd%3c%2fspan%3e"
},
"plainMessage": {
"href": "data:text/plain;charset=utf-8,asdgasd"
}
},
"rel": "message"
}
}
}
当用户实际加入对话或关闭他们的 Skype 对话窗口时,我不确定我应该如何区分这些添加/删除的事件和真实事件。我已经尝试关闭参与者消息事件,但后来我发现当 Skype 用户关闭他们的对话窗口时,我不能可靠地收到参与者消息删除事件。我对使用 UCWA 还很陌生,所以我不确定这是否是 UCWA 的本地版本的正常行为,还是 Skype Online 实施的错误。
我知道 Microsoft 刚刚在 Skype for Business Online 中启用了此 UCWA 功能,但与我之前使用 UCMA 或 Lync Client SDK 的行为相比,它似乎非常不稳定。