mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56: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
|
context
|
||||||
.sql
|
.sql
|
||||||
.execute(
|
.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
|
.await
|
||||||
.context("failed to remove old MDNs")
|
.context("failed to remove old MDNs")
|
||||||
@@ -773,8 +774,9 @@ pub async fn housekeeping(context: &Context) -> Result<()> {
|
|||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.execute(
|
.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
|
.await
|
||||||
.context("failed to remove old webxdc status updates")
|
.context("failed to remove old webxdc status updates")
|
||||||
|
|||||||
Reference in New Issue
Block a user