From 3e62967852f56b7f0a53af0a61dfc17bfc68c86c Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 8 Aug 2019 14:20:37 +0200 Subject: [PATCH] [Store] Fix last query --- lib/src/Store.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/Store.dart b/lib/src/Store.dart index e5a26ca..994e9c7 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -196,7 +196,7 @@ class Store { // Is the timeline limited? Then all previous messages should be // removed from the database! if (roomUpdate.limitedTimeline) { - txn.rawDelete("DELETE FROM Events WHERE chat_id=?", [roomUpdate.id]); + txn.rawDelete("DELETE FROM Events WHERE room_id=?", [roomUpdate.id]); txn.rawUpdate("UPDATE Rooms SET prev_batch=? WHERE id=?", [roomUpdate.prev_batch, roomUpdate.id]); }