From 9d043076e8a8e04de7e38b4d754d734fb69cf691 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 8 Mar 2017 20:54:13 +0100 Subject: [PATCH] only take 1:1 conversations into account when determining catchup timestamp --- .../eu/siacs/conversations/persistance/DatabaseBackend.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index b05044a00..092a52ab9 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -835,7 +835,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { Cursor cursor = null; try { SQLiteDatabase db = this.getReadableDatabase(); - String sql = "select messages.timeSent,messages.serverMsgId from accounts join conversations on accounts.uuid=conversations.accountUuid join messages on conversations.uuid=messages.conversationUuid where accounts.uuid=? and (messages.status=0 or messages.carbon=1 or messages.serverMsgId not null) order by messages.timesent desc limit 1"; + String sql = "select messages.timeSent,messages.serverMsgId from accounts join conversations on accounts.uuid=conversations.accountUuid join messages on conversations.uuid=messages.conversationUuid where accounts.uuid=? and (messages.status=0 or messages.carbon=1 or messages.serverMsgId not null) and conversations.mode=0 order by messages.timesent desc limit 1"; String[] args = {account.getUuid()}; cursor = db.rawQuery(sql, args); if (cursor.getCount() == 0) {