mirror of
https://github.com/chatmail/core.git
synced 2026-05-12 19:36:32 +03:00
Use 0 value for "delete_server_after" default.
Now 0 means "never delete", 1 means "delete at once" and other values indicate the number of seconds after which them message should be deleted from the server. Configuration value interpretation is moved into Context.get_config_delete_server_after() function.
This commit is contained in:
@@ -859,8 +859,11 @@ pub fn job_send_msg(context: &Context, msg_id: MsgId) -> Result<()> {
|
||||
.get_config(Config::ConfiguredAddr)
|
||||
.unwrap_or_default();
|
||||
let lowercase_from = from.to_lowercase();
|
||||
|
||||
// Send BCC to self if it is enabled and we are not going to
|
||||
// delete it immediately.
|
||||
if context.get_config_bool(Config::BccSelf)
|
||||
&& context.get_config_int(Config::DeleteServerAfter) != 0
|
||||
&& context.get_config_delete_server_after() != Some(0)
|
||||
&& !recipients
|
||||
.iter()
|
||||
.any(|x| x.to_lowercase() == lowercase_from)
|
||||
|
||||
Reference in New Issue
Block a user