mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
* Fix #2335 (delete job flooding) The problem was: - You are offline, and an ephemeral message is due to delete. - load_imap_deletion_job() is called and returns a deletion job for it. - The job fails because, well, we are offline. - The job is saved into the database. - load_imap_deletion_job() is called again, and so on. * Add test
This commit is contained in:
@@ -130,7 +130,7 @@ impl From<Action> for Thread {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Job {
|
||||
pub job_id: u32,
|
||||
pub action: Action,
|
||||
@@ -1030,7 +1030,7 @@ pub(crate) enum Connection<'a> {
|
||||
Smtp(&'a mut Smtp),
|
||||
}
|
||||
|
||||
async fn load_imap_deletion_job(context: &Context) -> sql::Result<Option<Job>> {
|
||||
pub(crate) async fn load_imap_deletion_job(context: &Context) -> sql::Result<Option<Job>> {
|
||||
let res = if let Some(msg_id) = load_imap_deletion_msgid(context).await? {
|
||||
info!(context, "verbose (issue 2335): loading imap deletion job");
|
||||
Some(Job::new(
|
||||
|
||||
Reference in New Issue
Block a user