aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-29 15:56:59 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-29 15:57:54 +0200
commit3e4c45143b991a7c8adbf6cf1588e4d4d2b74955 (patch)
tree9f92bca636295a9a01dc085bccd29a1b45f60e85 /src
parent06d4fd73e0ec3dadb7e44426b9a37f9a25d8eb37 (diff)
search for muc pms when fetching last mam reference
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
index 152a59f94..e98c8a513 100644
--- a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
@@ -901,7 +901,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) and conversations.mode=0 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 or (messages.serverMsgId not null and messages.type=4)) order by messages.timesent desc limit 1";
String[] args = {account.getUuid()};
cursor = db.rawQuery(sql, args);
if (cursor.getCount() == 0) {