From 42d09d403303a773596f83fa809ee09e5bc77d77 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Mon, 18 May 2026 07:13:18 -0300 Subject: [PATCH] fix: ChatId::delete_ex(): Interrupt inbox loop Messages are deleted from the inbox loop, so it should be interrupted. The SMTP doesn't need to be interrupted explicitly however, chat::sync() already does this internally. --- src/chat.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 80a6cd156..f7b707b10 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -687,6 +687,7 @@ SELECT id, rfc724_mid, pre_rfc724_mid, timestamp, ?, 1 FROM msgs WHERE chat_id=? context.emit_event(EventType::ChatDeleted { chat_id: self }); context.emit_msgs_changed_without_ids(); + context.scheduler.interrupt_inbox().await; if let Some(id) = sync_id { self::sync(context, id, SyncAction::Delete) .await @@ -703,8 +704,6 @@ SELECT id, rfc724_mid, pre_rfc724_mid, timestamp, ?, 1 FROM msgs WHERE chat_id=? context .set_config_internal(Config::LastHousekeeping, None) .await?; - context.scheduler.interrupt_smtp().await; - Ok(()) }