fix load remote messae issue

This commit is contained in:
imndx
2019-05-10 16:53:24 +08:00
parent 6570d71234
commit f66d0e5cd7
@@ -553,7 +553,7 @@ public class DatabaseStore {
List<WFCMessage.Message> 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 = ?";
}