mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 09:26:30 +03:00
feat: decide_chat_assignment: Log correct post_msg_exists value
rfc724_mid_exists() returns the message id not only when the message is fully downloaded, so we need to check this additionally. Also improve test_receive_pre_message to check that receiving the pre-message again doesn't affect the existing message.
This commit is contained in:
@@ -118,7 +118,13 @@ async fn test_receive_pre_message() -> Result<()> {
|
||||
let msg = bob.recv_msg(&pre_message).await;
|
||||
assert_eq!(msg.download_state, DownloadState::Available);
|
||||
assert_summary_texts(&msg, bob, "👤 test").await;
|
||||
let chat_id = msg.chat_id;
|
||||
|
||||
assert!(bob.recv_msg_opt(&pre_message).await.is_none());
|
||||
let msg = Message::load_from_db(bob, msg.id).await?;
|
||||
assert_eq!(msg.download_state, DownloadState::Available);
|
||||
assert_summary_texts(&msg, bob, "👤 test").await;
|
||||
assert_eq!(msg.chat_id, chat_id);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user