mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
Properly check for MUC MAM support
Only use MAM (XEP-0313) in MUCs if it is supported. This should fix #1264
This commit is contained in:
parent
403db3b080
commit
05d0c9f4fe
@ -1078,13 +1078,15 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
|||||||
checkDeletedFiles(conversation);
|
checkDeletedFiles(conversation);
|
||||||
callback.onMoreMessagesLoaded(messages.size(), conversation);
|
callback.onMoreMessagesLoaded(messages.size(), conversation);
|
||||||
} else if (conversation.hasMessagesLeftOnServer()
|
} else if (conversation.hasMessagesLeftOnServer()
|
||||||
&& account.isOnlineAndConnected()
|
&& account.isOnlineAndConnected()) {
|
||||||
&& account.getXmppConnection().getFeatures().mam()) {
|
if ((conversation.getMode() == Conversation.MODE_SINGLE && account.getXmppConnection().getFeatures().mam())
|
||||||
MessageArchiveService.Query query = getMessageArchiveService().query(conversation,0,timestamp - 1);
|
|| (conversation.getMode() == Conversation.MODE_MULTI && conversation.getMucOptions().mamSupport())) {
|
||||||
if (query != null) {
|
MessageArchiveService.Query query = getMessageArchiveService().query(conversation,0,timestamp - 1);
|
||||||
query.setCallback(callback);
|
if (query != null) {
|
||||||
|
query.setCallback(callback);
|
||||||
|
}
|
||||||
|
callback.informUser(R.string.fetching_history_from_server);
|
||||||
}
|
}
|
||||||
callback.informUser(R.string.fetching_history_from_server);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user