March 2018
Beginner to intermediate
410 pages
10h 40m
English
If one of your contacts cancels your presence subscription, you need to reorganize yourself as well, since you will no longer be able to communicate properly with that device. You should treat this case in the same way as if the roster item was removed. Any other changes might be caused by changes in the remote device. So, to make sure, you should re-subscribe to its sensor data, if it's a sensor, to make sure you continue to get information from it:
private void XmppClient_OnRosterItemUpdated(object Sender, RosterItem Item) { bool IsSensor; Log.Informational("Roster item updated.", Item.BareJid); if (((IsSensor = (this.sensorJid != null && string.Compare(Item.BareJid,this.sensorJid,true)==0)) || ...Read now
Unlock full access