mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 08:56:29 +03:00
Use ForcePlaintext as enum, not i32
This commit is contained in:
committed by
link2xt
parent
a7178f4f25
commit
6fcc589655
@@ -842,7 +842,13 @@ 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.param.get_int(Param::ForcePlaintext).unwrap_or_default() == 0 {
|
||||
if msg
|
||||
.param
|
||||
.get_int(Param::ForcePlaintext)
|
||||
.and_then::<ForcePlaintext, _>(num_traits::FromPrimitive::from_i32)
|
||||
.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