mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
Merge pull request #2057 from deltachat/fix-mistakenly-unarchive
fix mistakenly unarchive
This commit is contained in:
@@ -772,9 +772,6 @@ async fn add_parts(
|
|||||||
|
|
||||||
*sent_timestamp = std::cmp::min(*sent_timestamp, rcvd_timestamp);
|
*sent_timestamp = std::cmp::min(*sent_timestamp, rcvd_timestamp);
|
||||||
|
|
||||||
// unarchive chat
|
|
||||||
chat_id.unarchive(context).await?;
|
|
||||||
|
|
||||||
// if the mime-headers should be saved, find out its size
|
// if the mime-headers should be saved, find out its size
|
||||||
// (the mime-header ends with an empty line)
|
// (the mime-header ends with an empty line)
|
||||||
let save_mime_headers = context.get_config_bool(Config::SaveMimeHeaders).await;
|
let save_mime_headers = context.get_config_bool(Config::SaveMimeHeaders).await;
|
||||||
@@ -896,6 +893,10 @@ async fn add_parts(
|
|||||||
*insert_msg_id = *id;
|
*insert_msg_id = *id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !is_hidden {
|
||||||
|
chat_id.unarchive(context).await?;
|
||||||
|
}
|
||||||
|
|
||||||
*hidden = is_hidden;
|
*hidden = is_hidden;
|
||||||
created_db_entries.extend(ids.iter().map(|id| (chat_id, *id)));
|
created_db_entries.extend(ids.iter().map(|id| (chat_id, *id)));
|
||||||
mime_parser.parts = new_parts;
|
mime_parser.parts = new_parts;
|
||||||
@@ -2227,7 +2228,7 @@ mod tests {
|
|||||||
let t = TestContext::new_alice().await;
|
let t = TestContext::new_alice().await;
|
||||||
|
|
||||||
// create one-to-one with bob, archive one-to-one
|
// create one-to-one with bob, archive one-to-one
|
||||||
let bob_id = Contact::create(&t.ctx, "bob", "bob@exampel.org")
|
let bob_id = Contact::create(&t.ctx, "bob", "bob@example.com")
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let one2one_id = chat::create_by_contact_id(&t.ctx, bob_id).await.unwrap();
|
let one2one_id = chat::create_by_contact_id(&t.ctx, bob_id).await.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user