mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
Split ForcePlaintext param into two booleans
This allows to send encrypted messages without Autocrypt header.
This commit is contained in:
committed by
link2xt
parent
6fcc589655
commit
f657b2950c
@@ -842,12 +842,10 @@ impl Chat {
|
||||
/* check if we want to encrypt this message. If yes and circumstances change
|
||||
so that E2EE is no longer available at a later point (reset, changed settings),
|
||||
we might not send the message out at all */
|
||||
if msg
|
||||
if !msg
|
||||
.param
|
||||
.get_int(Param::ForcePlaintext)
|
||||
.and_then::<ForcePlaintext, _>(num_traits::FromPrimitive::from_i32)
|
||||
.get_bool(Param::ForcePlaintext)
|
||||
.unwrap_or_default()
|
||||
== ForcePlaintext::Dont
|
||||
{
|
||||
let mut can_encrypt = true;
|
||||
let mut all_mutual = context.get_config_bool(Config::E2eeEnabled).await;
|
||||
|
||||
Reference in New Issue
Block a user