diff options
author | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-04 18:16:55 +0100 |
---|---|---|
committer | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-04 18:16:55 +0100 |
commit | 3522243835fd29751109cb578897b4e403f06b7d (patch) | |
tree | 63a57af25b19d38665f1321428d10b1822376e8f /src/main/java | |
parent | e6cd92a663ba2f8ae572c901b359ce0f42db5900 (diff) |
do not run mam queries in findOrCreateConversation() when isn't available
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index beba97fe..59cb3bb2 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1052,11 +1052,13 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } this.databaseBackend.createConversation(conversation); } - if (query == null) { - this.mMessageArchiveService.query(conversation); - } else { - if (query.getConversation() == null) { - this.mMessageArchiveService.query(conversation,query.getStart()); + if (account.getXmppConnection() != null && account.getXmppConnection().getFeatures().mam()) { + if (query == null) { + this.mMessageArchiveService.query(conversation); + } else { + if (query.getConversation() == null) { + this.mMessageArchiveService.query(conversation, query.getStart()); + } } } this.conversations.add(conversation); |