mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix: Don't mark message as IMAP-seen if it already exists, but has state < InSeen
The message may not exist on another device.
This commit is contained in:
13
src/imap.rs
13
src/imap.rs
@@ -2248,11 +2248,16 @@ pub(crate) async fn prefetch_should_download(
|
||||
message_id: &str,
|
||||
mut flags: impl Iterator<Item = Flag<'_>>,
|
||||
) -> Result<bool> {
|
||||
if message::rfc724_mid_exists(context, message_id)
|
||||
.await?
|
||||
.is_some()
|
||||
if let Some((.., seen)) = message::rfc724_mid_exists_ex(
|
||||
context,
|
||||
message_id,
|
||||
"state>=16", // `InSeen`
|
||||
)
|
||||
.await?
|
||||
{
|
||||
markseen_on_imap_table(context, message_id).await?;
|
||||
if seen {
|
||||
markseen_on_imap_table(context, message_id).await?;
|
||||
}
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user