mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
test: MDN on pre-message has effect if received before sending full message (#8004)
Actually, the problem in #8004 is that a pre-message doesn't "want MDN" if it has no text. Anyway, the added test reproduces the bug.
This commit is contained in:
@@ -623,16 +623,25 @@ impl TestContext {
|
||||
}
|
||||
|
||||
pub async fn pop_sent_msg_opt(&self, timeout: Duration) -> Option<SentMessage<'_>> {
|
||||
let from_head = self
|
||||
.get_config_bool(Config::PopSentMsgFromHead)
|
||||
.await
|
||||
.unwrap();
|
||||
let order_subst = match from_head {
|
||||
true => "",
|
||||
false => " DESC",
|
||||
};
|
||||
let start = Instant::now();
|
||||
let (rowid, msg_id, payload, recipients) = loop {
|
||||
let row = self
|
||||
.ctx
|
||||
.sql
|
||||
.query_row_optional(
|
||||
r#"
|
||||
SELECT id, msg_id, mime, recipients
|
||||
FROM smtp
|
||||
ORDER BY id DESC"#,
|
||||
&format!(
|
||||
"SELECT id, msg_id, mime, recipients
|
||||
FROM smtp
|
||||
ORDER BY id{order_subst}"
|
||||
),
|
||||
(),
|
||||
|row| {
|
||||
let rowid: i64 = row.get(0)?;
|
||||
|
||||
Reference in New Issue
Block a user