From 111685170cc6b6f4afbe1fc1d9faa0e918c462e3 Mon Sep 17 00:00:00 2001 From: Nameless Date: Mon, 13 Jul 2020 13:52:51 +0800 Subject: [PATCH] Fix disappearing msgs (#132) --- tg/update_handlers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tg/update_handlers.py b/tg/update_handlers.py index 46354c1..e229bbe 100644 --- a/tg/update_handlers.py +++ b/tg/update_handlers.py @@ -259,6 +259,9 @@ def update_message_content_opened( def update_delete_messages( controller: Controller, update: Dict[str, Any] ) -> None: + if not update["is_permanent"]: + log.debug("Ignoring deletiong becuase not permanent: %s", update) + return chat_id = update["chat_id"] msg_ids = update["message_ids"] controller.model.msgs.remove_messages(chat_id, msg_ids)