Fix disappearing msgs (#132)

This commit is contained in:
Nameless 2020-07-13 13:52:51 +08:00 committed by GitHub
parent aeab7c1564
commit 111685170c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)