introduce config option to enable manual encryption mode

This commit is contained in:
missytake
2022-11-20 21:42:35 +01:00
parent 960a7f82ef
commit 62d56947ee
3 changed files with 6 additions and 0 deletions

View File

@@ -332,6 +332,7 @@ char* dc_get_blobdir (const dc_context_t* context);
* To save traffic, however, the avatar is attached only as needed
* and also recoded to a reasonable size.
* - `e2ee_enabled` = 0=no end-to-end-encryption, 1=prefer end-to-end-encryption (default)
* - `manual_encryption_mode` = 0=autocrypt mode (default), 1=choose encryption mode manually per chat
* - `mdns_enabled` = 0=do not send or request read receipts,
* 1=send and request read receipts (default)
* - `bcc_self` = 0=do not send a copy of outgoing messages to self (default),

View File

@@ -61,6 +61,9 @@ pub enum Config {
#[strum(props(default = "1"))]
E2eeEnabled,
#[strum(props(default = "0"))]
ManualEncryptionMode,
#[strum(props(default = "1"))]
MdnsEnabled,

View File

@@ -543,6 +543,7 @@ impl Context {
.await?
.unwrap_or_else(|| "unknown".to_string());
let e2ee_enabled = self.get_config_int(Config::E2eeEnabled).await?;
let manual_encryption_mode = self.get_config_int(Config::ManualEncryptionMode).await?;
let mdns_enabled = self.get_config_int(Config::MdnsEnabled).await?;
let bcc_self = self.get_config_int(Config::BccSelf).await?;
let send_sync_msgs = self.get_config_int(Config::SendSyncMsgs).await?;
@@ -650,6 +651,7 @@ impl Context {
res.insert("configured_mvbox_folder", configured_mvbox_folder);
res.insert("mdns_enabled", mdns_enabled.to_string());
res.insert("e2ee_enabled", e2ee_enabled.to_string());
res.insert("manual_encryption_mode", manual_encryption_mode.to_string());
res.insert(
"key_gen_type",
self.get_config_int(Config::KeyGenType).await?.to_string(),