fix: housekeeping: Delete MDNs and webxdc status updates for tombstones

This commit is contained in:
iequidoo
2024-03-27 03:37:33 -03:00
committed by iequidoo
parent 72bfae9448
commit f436e915d3

View File

@@ -762,8 +762,9 @@ pub async fn housekeeping(context: &Context) -> Result<()> {
context
.sql
.execute(
"DELETE FROM msgs_mdns WHERE msg_id NOT IN (SELECT id FROM msgs)",
(),
"DELETE FROM msgs_mdns WHERE msg_id NOT IN \
(SELECT id FROM msgs WHERE chat_id!=?)",
(DC_CHAT_ID_TRASH,),
)
.await
.context("failed to remove old MDNs")
@@ -773,8 +774,9 @@ pub async fn housekeeping(context: &Context) -> Result<()> {
context
.sql
.execute(
"DELETE FROM msgs_status_updates WHERE msg_id NOT IN (SELECT id FROM msgs)",
(),
"DELETE FROM msgs_status_updates WHERE msg_id NOT IN \
(SELECT id FROM msgs WHERE chat_id!=?)",
(DC_CHAT_ID_TRASH,),
)
.await
.context("failed to remove old webxdc status updates")