mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 06:26:30 +03:00
fix: housekeeping: Delete MDNs and webxdc status updates for tombstones
This commit is contained in:
10
src/sql.rs
10
src/sql.rs
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user