mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
feat: Make resending OutPending messages possible (#5817)
This makes possible to schedule one more sending of the message, the existing jobs are not cancelled. Otherwise it's complicated to implement bots that resend messages when a new member joins the group.
This commit is contained in:
@@ -474,9 +474,17 @@ impl TestContext {
|
||||
.execute("DELETE FROM smtp WHERE id=?;", (rowid,))
|
||||
.await
|
||||
.expect("failed to remove job");
|
||||
update_msg_state(&self.ctx, msg_id, MessageState::OutDelivered)
|
||||
if !self
|
||||
.ctx
|
||||
.sql
|
||||
.exists("SELECT COUNT(*) FROM smtp WHERE msg_id=?", (msg_id,))
|
||||
.await
|
||||
.expect("failed to update message state");
|
||||
.expect("Failed to check for more jobs")
|
||||
{
|
||||
update_msg_state(&self.ctx, msg_id, MessageState::OutDelivered)
|
||||
.await
|
||||
.expect("failed to update message state");
|
||||
}
|
||||
|
||||
let payload_headers = payload.split("\r\n\r\n").next().unwrap().lines();
|
||||
let payload_header_names: Vec<_> = payload_headers
|
||||
|
||||
Reference in New Issue
Block a user