mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 04:58:47 +03:00
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:
@@ -685,20 +685,18 @@ ORDER BY id"
|
||||
.ctx
|
||||
.sql
|
||||
.query_map_vec(
|
||||
"SELECT id, msg_id, mime, recipients FROM smtp WHERE msg_id=?",
|
||||
"SELECT mime, recipients FROM smtp WHERE msg_id=?",
|
||||
(msg_id,),
|
||||
|row| {
|
||||
let _id: MsgId = row.get(0)?;
|
||||
let msg_id: MsgId = row.get(1)?;
|
||||
let mime: String = row.get(2)?;
|
||||
let recipients: String = row.get(3)?;
|
||||
Ok((msg_id, mime, recipients))
|
||||
let mime: String = row.get(0)?;
|
||||
let recipients: String = row.get(1)?;
|
||||
Ok((mime, recipients))
|
||||
},
|
||||
)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.map(|(msg_id, mime, recipients)| SentMessage {
|
||||
.map(|(mime, recipients)| SentMessage {
|
||||
payload: mime,
|
||||
sender_msg_id: msg_id,
|
||||
sender_context: &self.ctx,
|
||||
|
||||
Reference in New Issue
Block a user