test: cleanup get_smtp_rows_for_msg()

It was incorrectly converting unused row ID to MsgId type
and selecting already known msg_id.
This commit is contained in:
link2xt
2026-08-21 19:22:50 +00:00
committed by l
parent 15488ed210
commit 81ca5aa1ca

View File

@@ -685,20 +685,18 @@ ORDER BY id"
.ctx .ctx
.sql .sql
.query_map_vec( .query_map_vec(
"SELECT id, msg_id, mime, recipients FROM smtp WHERE msg_id=?", "SELECT mime, recipients FROM smtp WHERE msg_id=?",
(msg_id,), (msg_id,),
|row| { |row| {
let _id: MsgId = row.get(0)?; let mime: String = row.get(0)?;
let msg_id: MsgId = row.get(1)?; let recipients: String = row.get(1)?;
let mime: String = row.get(2)?; Ok((mime, recipients))
let recipients: String = row.get(3)?;
Ok((msg_id, mime, recipients))
}, },
) )
.await .await
.unwrap() .unwrap()
.into_iter() .into_iter()
.map(|(msg_id, mime, recipients)| SentMessage { .map(|(mime, recipients)| SentMessage {
payload: mime, payload: mime,
sender_msg_id: msg_id, sender_msg_id: msg_id,
sender_context: &self.ctx, sender_context: &self.ctx,