mirror of
https://github.com/chatmail/core.git
synced 2026-05-18 22:36:29 +03:00
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:
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user