From 3af45c306a83247c1d0fae1d5717e84fbb924d4b Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 14 Aug 2026 11:17:12 +0000 Subject: [PATCH] fix: make create_send_msg_jobs actually return row IDs .execute() was returning the number of rows, so usually 1. .insert() is returning the row ID. In most cases it does not matter because the result is checked with .is_empty(), but send_msg_sync() actually uses the row IDs. --- src/chat.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index a3a91a26a..d57065209 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3037,21 +3037,21 @@ WHERE id=? )?; let all_recipients = recipients.join(" "); if let Some(pre_msg) = &rendered_pre_msg { - let row_id = stmt.execute(( + let row_id = stmt.insert(( &pre_msg.rfc724_mid, &all_recipients, &pre_msg.message, msg.id, ))?; - row_ids.push(row_id.try_into()?); + row_ids.push(row_id); } - let row_id = stmt.execute(( + let row_id = stmt.insert(( &rendered_msg.rfc724_mid, &all_recipients, &rendered_msg.message, msg.id, ))?; - row_ids.push(row_id.try_into()?); + row_ids.push(row_id); } Ok(row_ids) };