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.
This commit is contained in:
iequidoo
2026-05-18 07:13:18 -03:00
parent c0e046425c
commit 42d09d4033

View File

@@ -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_event(EventType::ChatDeleted { chat_id: self });
context.emit_msgs_changed_without_ids(); context.emit_msgs_changed_without_ids();
context.scheduler.interrupt_inbox().await;
if let Some(id) = sync_id { if let Some(id) = sync_id {
self::sync(context, id, SyncAction::Delete) self::sync(context, id, SyncAction::Delete)
.await .await
@@ -703,8 +704,6 @@ SELECT id, rfc724_mid, pre_rfc724_mid, timestamp, ?, 1 FROM msgs WHERE chat_id=?
context context
.set_config_internal(Config::LastHousekeeping, None) .set_config_internal(Config::LastHousekeeping, None)
.await?; .await?;
context.scheduler.interrupt_smtp().await;
Ok(()) Ok(())
} }