Do not delete messages from special chats

This commit is contained in:
Alexander Krotov
2020-03-25 00:32:42 +03:00
parent 270d18a88a
commit 7e67b2cbb3

View File

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