dirty push / delete flags are not set/reset correctly
This commit is contained in:
parent
0078aee343
commit
355a6d1723
|
@ -431,6 +431,7 @@ public class XmppConnectionService extends Service {
|
||||||
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
||||||
} else {
|
} else {
|
||||||
contact.setOption(Contact.Options.IN_ROSTER);
|
contact.setOption(Contact.Options.IN_ROSTER);
|
||||||
|
contact.resetOption(Contact.Options.DIRTY_PUSH);
|
||||||
contact.parseSubscriptionFromElement(item);
|
contact.parseSubscriptionFromElement(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1263,6 +1264,7 @@ public class XmppConnectionService extends Service {
|
||||||
|
|
||||||
public void pushContactToServer(Contact contact) {
|
public void pushContactToServer(Contact contact) {
|
||||||
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
||||||
|
contact.setOption(Contact.Options.DIRTY_PUSH);
|
||||||
Account account = contact.getAccount();
|
Account account = contact.getAccount();
|
||||||
if (account.getStatus() == Account.STATUS_ONLINE) {
|
if (account.getStatus() == Account.STATUS_ONLINE) {
|
||||||
IqPacket iq = new IqPacket(IqPacket.TYPE_SET);
|
IqPacket iq = new IqPacket(IqPacket.TYPE_SET);
|
||||||
|
@ -1275,9 +1277,6 @@ public class XmppConnectionService extends Service {
|
||||||
Log.d("xmppService", "contact had pending subscription");
|
Log.d("xmppService", "contact had pending subscription");
|
||||||
sendPresenceUpdatesTo(contact);
|
sendPresenceUpdatesTo(contact);
|
||||||
}
|
}
|
||||||
contact.resetOption(Contact.Options.DIRTY_PUSH);
|
|
||||||
} else {
|
|
||||||
contact.setOption(Contact.Options.DIRTY_PUSH);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1291,7 +1290,6 @@ public class XmppConnectionService extends Service {
|
||||||
item.setAttribute("jid", contact.getJid());
|
item.setAttribute("jid", contact.getJid());
|
||||||
item.setAttribute("subscription", "remove");
|
item.setAttribute("subscription", "remove");
|
||||||
account.getXmppConnection().sendIqPacket(iq, null);
|
account.getXmppConnection().sendIqPacket(iq, null);
|
||||||
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue