From f66d0e5cd78c98424b88e3d27d2aee0b8d32e62b Mon Sep 17 00:00:00 2001 From: imndx Date: Fri, 10 May 2019 16:53:24 +0800 Subject: [PATCH] fix load remote messae issue --- broker/src/main/java/io/moquette/persistence/DatabaseStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker/src/main/java/io/moquette/persistence/DatabaseStore.java b/broker/src/main/java/io/moquette/persistence/DatabaseStore.java index 6bf85c53..7c79065b 100644 --- a/broker/src/main/java/io/moquette/persistence/DatabaseStore.java +++ b/broker/src/main/java/io/moquette/persistence/DatabaseStore.java @@ -553,7 +553,7 @@ public class DatabaseStore { List loadRemoteMessagesFromTable(String user, WFCMessage.Conversation conversation, long beforeUid, int count, String table) { String sql = "select `_mid`, `_from`, `_type`, `_target`, `_line`, `_data`, `_dt` from " + table +" where"; if (conversation.getType() == ProtoConstants.ConversationType.ConversationType_Private) { - sql += " _type = ? and _line = ? and _mid < ? and ((_target = ? and _from = ?) or (_target = ? and _from = ?)"; + sql += " _type = ? and _line = ? and _mid < ? and ((_target = ? and _from = ?) or (_target = ? and _from = ?))"; } else { sql += " _type = ? and _line = ? and _mid < ? and _target = ?"; }