From 47c45db2f75db95234d6e9454208250d51985167 Mon Sep 17 00:00:00 2001 From: riccardocucia Date: Thu, 26 Dec 2024 18:11:23 +0100 Subject: [PATCH] Fixed #27 Error in room or message deletion query, a `limit(1)` was incorrectly applied --- CHANGELOG.md | 1 + lib/src/class/supabase_chat_core.dart | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e46b799..3dea936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Improvement documentations. ### Fixed * Fixed #25 Update chats.update_last_messages trigger to make sure it is only called for actual last message in case of update +* Fixed #27 Error in room or message deletion query, a `limit(1)` was incorrectly applied ## [1.4.2] - 2024-11-30 #### [@rickypid](https://github.com/rickypid) diff --git a/lib/src/class/supabase_chat_core.dart b/lib/src/class/supabase_chat_core.dart index d3a11ea..4957eff 100644 --- a/lib/src/class/supabase_chat_core.dart +++ b/lib/src/class/supabase_chat_core.dart @@ -288,8 +288,7 @@ class SupabaseChatCore { .from(config.messagesTableName) .delete() .eq('roomId', roomId) - .eq('id', messageId) - .limit(1); + .eq('id', messageId); } /// Removes room. @@ -298,8 +297,7 @@ class SupabaseChatCore { .schema(config.schema) .from(config.roomsTableName) .delete() - .eq('id', roomId) - .limit(1); + .eq('id', roomId); } /// Get room.