mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 05:46:29 +03:00
add multi-device sync (#2669)
* add basic multi-device-sync functions * generate json * add context.parse_sync_items() * add context.execute_sync_items() * piggyback sync-commands message, add body for human-readable part * avoid double json renderings * mimeparser parses incoming .json sync-files * do not piggyback sync-files * execute sync items * return status of send_sync_msg() * send sync messages as multipart/report * add a per-item-timestamp and also allow adding other per-item-fields in the future * if the self-chat does not exist, create it blocked/hidden * create tokens closer to real qr-code needs * respect bcc_self setting, add test for that * sync qr code tokens after promoting groups * send sync-messages only if an experimental switch is set * trigger send_sync_msg() after sending messages and after creating/redraw/revive qr-code * add DC_STR_* constants to deltachat.h * adapt to refactored qr module as of #2729 * tweak test * use SendSyncMsgs config name instead of SendExperimentalSyncMsgs - we can remove or rename the config nevertheless, but have the option to keep it without renaming * tweak docs * remove currently unused effective timestamp calculation * clarify when send_sync_msg() is called * make sure, sync-messages are encrypted and are sent by SELF * tweak docs, fix typos
This commit is contained in:
@@ -303,6 +303,7 @@ impl Context {
|
||||
let e2ee_enabled = self.get_config_int(Config::E2eeEnabled).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?;
|
||||
|
||||
let prv_key_cnt = self
|
||||
.sql
|
||||
@@ -392,6 +393,7 @@ impl Context {
|
||||
self.get_config_int(Config::KeyGenType).await?.to_string(),
|
||||
);
|
||||
res.insert("bcc_self", bcc_self.to_string());
|
||||
res.insert("send_sync_msgs", send_sync_msgs.to_string());
|
||||
res.insert("private_key_count", prv_key_cnt.to_string());
|
||||
res.insert("public_key_count", pub_key_cnt.to_string());
|
||||
res.insert("fingerprint", fingerprint_str);
|
||||
|
||||
Reference in New Issue
Block a user