mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
fix: delete available_post_msgs row if there is no corresponding IMAP entry
If we learn about this message being available on IMAP later, we will add another available_post_msgs row. If we don't delete the row, we will keep failing each time until IMAP entry becomes available and it may not happen.
This commit is contained in:
@@ -165,6 +165,7 @@ pub(crate) async fn download_msg(
|
||||
|
||||
let Some((server_uid, server_folder, msg_transport_id)) = row else {
|
||||
// No IMAP record found, we don't know the UID and folder.
|
||||
delete_from_available_post_msgs(context, &rfc724_mid).await?;
|
||||
return Err(anyhow!(
|
||||
"IMAP location for {rfc724_mid:?} post-message is unknown"
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user