mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +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
|
.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,
|
||||||
|
|||||||
Reference in New Issue
Block a user