mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
introduce config option to enable manual encryption mode
This commit is contained in:
@@ -332,6 +332,7 @@ char* dc_get_blobdir (const dc_context_t* context);
|
|||||||
* To save traffic, however, the avatar is attached only as needed
|
* To save traffic, however, the avatar is attached only as needed
|
||||||
* and also recoded to a reasonable size.
|
* and also recoded to a reasonable size.
|
||||||
* - `e2ee_enabled` = 0=no end-to-end-encryption, 1=prefer end-to-end-encryption (default)
|
* - `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,
|
* - `mdns_enabled` = 0=do not send or request read receipts,
|
||||||
* 1=send and request read receipts (default)
|
* 1=send and request read receipts (default)
|
||||||
* - `bcc_self` = 0=do not send a copy of outgoing messages to self (default),
|
* - `bcc_self` = 0=do not send a copy of outgoing messages to self (default),
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ pub enum Config {
|
|||||||
#[strum(props(default = "1"))]
|
#[strum(props(default = "1"))]
|
||||||
E2eeEnabled,
|
E2eeEnabled,
|
||||||
|
|
||||||
|
#[strum(props(default = "0"))]
|
||||||
|
ManualEncryptionMode,
|
||||||
|
|
||||||
#[strum(props(default = "1"))]
|
#[strum(props(default = "1"))]
|
||||||
MdnsEnabled,
|
MdnsEnabled,
|
||||||
|
|
||||||
|
|||||||
@@ -543,6 +543,7 @@ impl Context {
|
|||||||
.await?
|
.await?
|
||||||
.unwrap_or_else(|| "unknown".to_string());
|
.unwrap_or_else(|| "unknown".to_string());
|
||||||
let e2ee_enabled = self.get_config_int(Config::E2eeEnabled).await?;
|
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 mdns_enabled = self.get_config_int(Config::MdnsEnabled).await?;
|
||||||
let bcc_self = self.get_config_int(Config::BccSelf).await?;
|
let bcc_self = self.get_config_int(Config::BccSelf).await?;
|
||||||
let send_sync_msgs = self.get_config_int(Config::SendSyncMsgs).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("configured_mvbox_folder", configured_mvbox_folder);
|
||||||
res.insert("mdns_enabled", mdns_enabled.to_string());
|
res.insert("mdns_enabled", mdns_enabled.to_string());
|
||||||
res.insert("e2ee_enabled", e2ee_enabled.to_string());
|
res.insert("e2ee_enabled", e2ee_enabled.to_string());
|
||||||
|
res.insert("manual_encryption_mode", manual_encryption_mode.to_string());
|
||||||
res.insert(
|
res.insert(
|
||||||
"key_gen_type",
|
"key_gen_type",
|
||||||
self.get_config_int(Config::KeyGenType).await?.to_string(),
|
self.get_config_int(Config::KeyGenType).await?.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user