aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2016-04-23 15:33:25 +0200
committerChristian S <christian@pix-art.de>2016-04-23 15:33:25 +0200
commit6a6112daeb5677594ab047f6fa6fe843b1b49f0c (patch)
treea02e7445f1ef449ad88304511b6417209a8e4d06 /src
parentd8b928c81b0e53bb62e88678381e23c9e5b5c55b (diff)
Prevent presences from being cleared on connection
Sometimes when enabling/reenabling accounts the initial presences that the server sends get cleared shortly after connecting. This might also be what caused siacs/Conversations#1705. This commit fixes the status inconsistencies I have experienced, though there might be more causes for the problems described in that issue.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 82fe4a4e2..90e8470db 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -262,7 +262,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
}
}
- account.getRoster().clearPresences();
mJingleConnectionManager.cancelInTransmission();
fetchRosterFromServer(account);
fetchBookmarks(account);
@@ -2220,6 +2219,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
sendOfflinePresence(account);
}
account.getXmppConnection().disconnect(force);
+ account.getRoster().clearPresences();
}
}
@@ -2642,7 +2642,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
scheduleWakeUpCall(Config.CONNECT_DISCO_TIMEOUT, account.getUuid().hashCode());
} else {
disconnect(account, force);
- account.getRoster().clearPresences();
connection.resetEverything();
account.getAxolotlService().resetBrokenness();
}