From a888a17b7e91cfbf97f7cac04b04b6d29a29c2f0 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sun, 12 Apr 2026 14:39:29 -0500 Subject: [PATCH] fix(message_handler): remove conversation read state when deleting a conversation --- meshchatx/src/backend/message_handler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meshchatx/src/backend/message_handler.py b/meshchatx/src/backend/message_handler.py index 65625c3..4c3d257 100644 --- a/meshchatx/src/backend/message_handler.py +++ b/meshchatx/src/backend/message_handler.py @@ -41,6 +41,10 @@ class MessageHandler: def delete_conversation(self, local_hash, destination_hash): query = "DELETE FROM lxmf_messages WHERE peer_hash = ?" self.db.provider.execute(query, [destination_hash]) + self.db.provider.execute( + "DELETE FROM lxmf_conversation_read_state WHERE destination_hash = ?", + [destination_hash], + ) # Also clean up folder mapping self.db.provider.execute( "DELETE FROM lxmf_conversation_folders WHERE peer_hash = ?",