diff --git a/deltachat-repl/src/cmdline.rs b/deltachat-repl/src/cmdline.rs index 28a166630..feee46bd4 100644 --- a/deltachat-repl/src/cmdline.rs +++ b/deltachat-repl/src/cmdline.rs @@ -33,14 +33,6 @@ use tokio::fs; /// e.g. bitmask 7 triggers actions defined with bits 1, 2 and 4. async fn reset_tables(context: &Context, bits: i32) { println!("Resetting tables ({bits})..."); - if 0 != bits & 1 { - context - .sql() - .execute("DELETE FROM jobs;", ()) - .await - .unwrap(); - println!("(1) Jobs reset."); - } if 0 != bits & 2 { context .sql() diff --git a/src/param.rs b/src/param.rs index d035d2d11..19f2eb8fa 100644 --- a/src/param.rs +++ b/src/param.rs @@ -9,7 +9,6 @@ use serde::{Deserialize, Serialize}; use crate::blob::BlobObject; use crate::context::Context; -use crate::message::MsgId; use crate::mimeparser::SystemMessage; /// Available param keys. @@ -18,7 +17,7 @@ use crate::mimeparser::SystemMessage; )] #[repr(u8)] pub enum Param { - /// For messages and jobs + /// For messages File = b'f', /// For messages: original filename (as shown in chat) @@ -107,18 +106,12 @@ pub enum Param { /// is used to also send all the forwarded messages. PrepForwards = b'P', - /// For Jobs + /// For Messages SetLatitude = b'l', - /// For Jobs + /// For Messages SetLongitude = b'n', - /// For Jobs - AlsoMove = b'M', - - /// For MDN-sending job - MsgId = b'I', - /// For Groups /// /// An unpromoted group has not had any messages sent to it and thus only exists on the @@ -173,9 +166,6 @@ pub enum Param { /// For Chats: timestamp of member list update. MemberListTimestamp = b'k', - /// For Chats: timestamp of protection settings update. - ProtectionSettingsTimestamp = b'L', - /// For Webxdc Message Instances: Current document name WebxdcDocument = b'R', @@ -190,6 +180,7 @@ pub enum Param { /// For messages: Whether [crate::message::Viewtype::Sticker] should be forced. ForceSticker = b'X', + // 'L' was defined as ProtectionSettingsTimestamp for Chats, however, never used in production. } /// An object for handling key=value parameter lists. @@ -399,12 +390,6 @@ impl Params { Ok(Some(path)) } - pub fn get_msg_id(&self) -> Option { - self.get(Param::MsgId) - .and_then(|x| x.parse().ok()) - .map(MsgId::new) - } - /// Set the given parameter to the passed in `i32`. pub fn set_int(&mut self, key: Param, value: i32) -> &mut Self { self.set(key, format!("{value}")); diff --git a/src/sql.rs b/src/sql.rs index 20774d852..1a43acf8e 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -806,13 +806,6 @@ pub async fn remove_unused_files(context: &Context) -> Result<()> { Param::File, ) .await?; - maybe_add_from_param( - &context.sql, - &mut files_in_use, - "SELECT param FROM jobs;", - Param::File, - ) - .await?; maybe_add_from_param( &context.sql, &mut files_in_use,