From 9bd377c4beb6e09b002b594be18450620b80dca2 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 12 Jun 2019 12:34:46 +0200 Subject: [PATCH] Fix roomList query --- lib/src/Store.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/Store.dart b/lib/src/Store.dart index cf3e931..0e6055c 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -467,10 +467,9 @@ class Store { "SELECT rooms.*, events.origin_server_ts, events.content_json, events.type, events.sender, events.status, events.state_key " + " FROM Rooms rooms LEFT JOIN Events events " + " ON rooms.id=events.chat_id " + - " WHERE rooms.id!='' " + - " AND rooms.membership" + + " WHERE rooms.membership" + (onlyLeft ? "=" : "!=") + - "'left' " + + "'leave' " + (onlyDirect ? " AND rooms.direct_chat_matrix_id!= '' " : "") + (onlyGroups ? " AND rooms.direct_chat_matrix_id= '' " : "") + " GROUP BY rooms.id " +