Delete expired messages instead of hiding them

For hidden messages, blobs are not deleted during housekeeping. To
actually free the space used by media files, messages should be moved to
trash instead of being hidden.
This commit is contained in:
Alexander Krotov
2020-04-20 02:26:19 +03:00
parent a86c7c767a
commit 6c0dd8543d
2 changed files with 10 additions and 9 deletions

View File

@@ -93,8 +93,8 @@ impl Chatlist {
query_contact_id: Option<u32>,
) -> Result<Self> {
// Note that we do not emit DC_EVENT_MSGS_MODIFIED here even if some
// messages get hidden to avoid reloading the same chatlist.
if let Err(err) = hide_device_expired_messages(context) {
// messages get deleted to avoid reloading the same chatlist.
if let Err(err) = delete_device_expired_messages(context) {
warn!(context, "Failed to hide expired messages: {}", err);
}