From a66fa08be4cf6726e56925213e3610bea2073552 Mon Sep 17 00:00:00 2001 From: kosyak Date: Sun, 13 Oct 2024 23:42:38 +0200 Subject: [PATCH] fix conversation from db restoring --- .../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 3c06561e9..84853193e 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -1095,7 +1095,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { try(final Cursor cursor = db.query(Conversation.TABLENAME, null, Conversation.ACCOUNT + "=? AND (" + Conversation.CONTACTJID - + " like ? OR " + Conversation.CONTACTJID + "=?)", selectionArgs, null, null, null)) { + + " like ? OR " + Conversation.CONTACTJID + "=?) AND " + Conversation.NEXT_COUNTERPART + " =NULL", selectionArgs, null, null, null)) { if (cursor.getCount() == 0) { return null; }