private void Client_RosterUpdated(object sender, Sharp.Xmpp.Im.RosterUpdatedEventArgs e) { var existingUser = GetByJid(e.Item.Jid); if (existingUser != null) { if (e.Removed) { Users.Remove(existingUser); } else { // what changed?? } } else { AddUser(e.Item); } }
private void xmppClient_RosterUpdated(object sender, RosterUpdatedEventArgs e) { List<RosterItem> rosterItems = new List<RosterItem>(); RosterItem oldRosterItem = remoteRosterList.Where(w => w.Jid.GetBareJid() == e.Item.Jid.GetBareJid()).FirstOrDefault(); remoteRosterList.Remove(oldRosterItem); remoteRosterList.Add(e.Item); }