roster version bug

This commit is contained in:
Daniel Gultsch 2014-03-08 04:18:58 +01:00
parent f9fbc02825
commit fbd25c8129

View File

@ -176,11 +176,11 @@ public class XmppConnectionService extends Service {
if (accountChangedListener != null) { if (accountChangedListener != null) {
accountChangedListener.onAccountListChangedListener(); accountChangedListener.onAccountListChangedListener();
} }
if (account.getStatus() == Account.STATUS_ONLINE) {
databaseBackend.clearPresences(account);
if (account.getXmppConnection().hasFeatureRosterManagment()) { if (account.getXmppConnection().hasFeatureRosterManagment()) {
updateRoster(account, null); updateRoster(account, null);
} }
if (account.getStatus() == Account.STATUS_ONLINE) {
databaseBackend.clearPresences(account);
connectMultiModeConversations(account); connectMultiModeConversations(account);
List<Conversation> conversations = getConversations(); List<Conversation> conversations = getConversations();
for (int i = 0; i < conversations.size(); ++i) { for (int i = 0; i < conversations.size(); ++i) {
@ -613,10 +613,10 @@ public class XmppConnectionService extends Service {
query.setAttribute("xmlns", "jabber:iq:roster"); query.setAttribute("xmlns", "jabber:iq:roster");
if (!"".equals(account.getRosterVersion())) { if (!"".equals(account.getRosterVersion())) {
Log.d(LOGTAG,account.getJid()+ ": fetching roster version "+account.getRosterVersion()); Log.d(LOGTAG,account.getJid()+ ": fetching roster version "+account.getRosterVersion());
query.setAttribute("ver", account.getRosterVersion());
} else { } else {
Log.d(LOGTAG,account.getJid()+": fetching roster"); Log.d(LOGTAG,account.getJid()+": fetching roster");
} }
query.setAttribute("ver", account.getRosterVersion());
iqPacket.addChild(query); iqPacket.addChild(query);
account.getXmppConnection().sendIqPacket(iqPacket, account.getXmppConnection().sendIqPacket(iqPacket,
new OnIqPacketReceived() { new OnIqPacketReceived() {