aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-10 23:49:34 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-10 23:49:34 +0200
commit355a6d172371fecadff12d5b4853a1f36b35a01f (patch)
tree9b05c207fe5c9f768bb4db03a68a879d7afcab9d /src/eu
parent0078aee3434aeb9526658109935146575e954539 (diff)
dirty push / delete flags are not set/reset correctly
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index fb6297e7..6c652f8d 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -431,6 +431,7 @@ public class XmppConnectionService extends Service {
contact.resetOption(Contact.Options.DIRTY_DELETE);
} else {
contact.setOption(Contact.Options.IN_ROSTER);
+ contact.resetOption(Contact.Options.DIRTY_PUSH);
contact.parseSubscriptionFromElement(item);
}
}
@@ -1263,6 +1264,7 @@ public class XmppConnectionService extends Service {
public void pushContactToServer(Contact contact) {
contact.resetOption(Contact.Options.DIRTY_DELETE);
+ contact.setOption(Contact.Options.DIRTY_PUSH);
Account account = contact.getAccount();
if (account.getStatus() == Account.STATUS_ONLINE) {
IqPacket iq = new IqPacket(IqPacket.TYPE_SET);
@@ -1275,9 +1277,6 @@ public class XmppConnectionService extends Service {
Log.d("xmppService", "contact had pending subscription");
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("subscription", "remove");
account.getXmppConnection().sendIqPacket(iq, null);
- contact.resetOption(Contact.Options.DIRTY_DELETE);
}
}