How to know that when the user goes offline in AgsXMPP?
I am currently trying with agsXMPP library , i added users to a treenode on OnPresence event. its works well, but开发者_JS百科 when the other user goes offline i want to update the tree node, for that i need his Offline Presence ,How i get result when a chat buddy goes offline ?
When a buddy goes offline you get a OnPresence event with the Type of unavailable.
private void XmppCon_OnPresence(object sender, Presence pres)
{
if (pres.Type == PresenceType.unavailable)
{
// user goes offline
}
}
精彩评论