fix: chat::save_msgs: Interrupt inbox loop to send a sync message

Also fix the `send_sync_msg()` documentation: now it's called from the inbox loop, not SMTP (because
`IMAP APPEND` is used to upload sync messages).
This commit is contained in:
iequidoo
2025-02-26 14:51:09 -03:00
committed by iequidoo
parent c58f6107ba
commit a9fbdafda5
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ impl Context {
///
/// Mustn't be called from multiple tasks in parallel to avoid sending the same sync items twice
/// because sync items are removed from the db only after successful sending. We guarantee this
/// by calling `send_sync_msg()` only from the SMTP loop.
/// by calling `send_sync_msg()` only from the inbox loop.
pub async fn send_sync_msg(&self) -> Result<Option<MsgId>> {
if let Some((json, ids)) = self.build_sync_json().await? {
let chat_id =