fix: Make it possible to leave and immediately delete a chat (#7744)

Without this PR, if you leave and immediately delete a chat, the leave
message won't be sent.

This is needed for
https://github.com/deltachat/deltachat-android/issues/4158.
This commit is contained in:
Hocuri
2026-01-19 15:07:19 +01:00
committed by GitHub
parent c3a5e3ac0d
commit f5e1e2678b
2 changed files with 24 additions and 4 deletions

View File

@@ -635,10 +635,6 @@ impl ChatId {
"UPDATE imap SET target=? WHERE rfc724_mid IN (SELECT pre_rfc724_mid FROM msgs WHERE chat_id=? AND pre_rfc724_mid!='')",
(&delete_msgs_target, self,),
)?;
transaction.execute(
"DELETE FROM smtp WHERE msg_id IN (SELECT id FROM msgs WHERE chat_id=?)",
(self,),
)?;
transaction.execute(
"DELETE FROM msgs_mdns WHERE msg_id IN (SELECT id FROM msgs WHERE chat_id=?)",
(self,),