I'm running into some weird behavior with the Skype Online version of UCWA. I spin up a conversation with a user that is using the normal Skype for Business client, and proceed to chat back and forth with them. Sometimes, I'm getting what looks like erroneous participant added and deleted events from the UCWA events resource in the middle of a conversation.
For instance, I will receive a participant added event on one GET to the event resource. On the next, I receive a participant deleted event. On the third, I receive message events that the "deleted" participant has sent a couple of messages to me, sometimes there are also more participant added/deleted events as well.
Here's an example from one of my logs:
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"
}
}
}
I'm not sure how I'm supposed to distinguish between these added/deleted events and the real ones, when the user actually joins the conversation or closes their Skype conversation window. I've tried keying off of the participantMessaging event instead, but then I've found that I don't reliably receive a participantMessaging deleted event when the Skype user closes their conversation window. I'm fairly new to working with UCWA, so I'm not sure whether this is normal behavior for the on-premise version of UCWA as well, or a bug with the Skype Online implementation.
I know Microsoft has just enabled this UCWA functionality in Skype for Business Online, but it appears to be quite flaky, compared to the behavior I've experienced previously with either UCMA or the Lync Client SDK.