From 7e67b2cbb363979857019f27853cc88128b6dc93 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 25 Mar 2020 00:32:42 +0300 Subject: [PATCH] Do not delete messages from special chats --- src/chat.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index eba16047a..6adca60b9 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -2522,8 +2522,9 @@ pub fn delete_device_expired_messages(context: &Context) -> sql::Result<()> { context.sql.execute( "UPDATE msgs \ SET txt = '', hidden = 1 \ - WHERE timestamp < ?", - params![threshold_timestamp], + WHERE timestamp < ? \ + AND chat_id > ?", + params![threshold_timestamp, DC_CHAT_ID_LAST_SPECIAL], )?; } Ok(())