Trash messages more thoroughly (#2273)

Esp. remove some information for newly-arriving messages
This commit is contained in:
Hocuri
2021-03-02 12:04:53 +01:00
committed by GitHub
parent 2a39dc06e9
commit 476e613377
3 changed files with 23 additions and 9 deletions

View File

@@ -308,8 +308,10 @@ pub(crate) async fn delete_expired_messages(context: &Context) -> Result<bool, E
let mut updated = context
.sql
.execute(
// If you change which information is removed here, also change MsgId::trash() and
// which information dc_receive_imf::add_parts() still adds to the db if the chat_id is TRASH
"UPDATE msgs \
SET chat_id=?, txt='', txt_raw='', from_id=0, to_id=0, param='' \
SET chat_id=?, txt='', txt_raw='', mime_headers='', from_id=0, to_id=0, param='' \
WHERE \
ephemeral_timestamp != 0 \
AND ephemeral_timestamp <= ? \