Rename fetch_existing to fetch_existing_msgs, add comment (#2042)

This commit is contained in:
Hocuri
2020-10-24 12:10:36 +02:00
committed by GitHub
parent ef245b5759
commit 34af492afb
6 changed files with 11 additions and 7 deletions

View File

@@ -26,7 +26,7 @@
- speed up and clean up account creation #1912 #1927 #1960 #1961
- configure now collects recent contacts and fetches last messages
unless disabled by `fetch_existing` config-option #1913 #2003
unless disabled by `fetch_existing_msgs` config-option #1913 #2003
- emit `DC_EVENT_CHAT_MODIFIED` on contact rename
and set contact-id on `DC_EVENT_CONTACTS_CHANGED` #1935 #1936 #1937

View File

@@ -350,7 +350,7 @@ char* dc_get_blobdir (const dc_context_t* context);
* The type `jitsi:` may be handled by external apps.
* If no type is prefixed, the videochat is handled completely in a browser.
* - `bot` = Set to "1" if this is a bot. E.g. prevents adding the "Device messages" and "Saved messages" chats.
* - `fetch_existing` = 1=fetch most recent existing messages on configure (default),
* - `fetch_existing_msgs` = 1=fetch most recent existing messages on configure (default),
* 0=do not fetch existing messages on configure.
* In both cases, existing recipients are added to the contact database.
*

View File

@@ -2021,7 +2021,7 @@ class TestOnlineAccount:
assert ac1.direct_imap.idle_wait_for_seen()
ac1_clone = acfactory.clone_online_account(ac1)
ac1_clone.set_config("fetch_existing", "1")
ac1_clone.set_config("fetch_existing_msgs", "1")
ac1_clone._configtracker.wait_finish()
ac1_clone.start_io()

View File

@@ -69,8 +69,12 @@ pub enum Config {
#[strum(props(default = "0"))] // also change MediaQuality.default() on changes
MediaQuality,
#[strum(props(default = "0"))] // disabled for now, we'll set this back to "1" at some point
FetchExisting,
/// If set to "1", on the first time `start_io()` is called after configuring,
/// the newest existing messages are fetched.
/// Existing recipients are added to the contact database regardless of this setting.
#[strum(props(default = "0"))]
// disabled for now, we'll set this back to "1" at some point
FetchExistingMsgs,
#[strum(props(default = "0"))]
KeyGenType,

View File

@@ -639,7 +639,7 @@ impl Job {
add_all_recipients_as_contacts(context, imap, Config::ConfiguredMvboxFolder).await;
add_all_recipients_as_contacts(context, imap, Config::ConfiguredInboxFolder).await;
if context.get_config_bool(Config::FetchExisting).await {
if context.get_config_bool(Config::FetchExistingMsgs).await {
for config in &[
Config::ConfiguredMvboxFolder,
Config::ConfiguredInboxFolder,

View File

@@ -575,7 +575,7 @@ static P_NAUTA_CU: Lazy<Provider> = Lazy::new(|| {
ConfigDefault { key: Config::MvboxMove, value: "0" },
ConfigDefault { key: Config::E2eeEnabled, value: "0" },
ConfigDefault { key: Config::MediaQuality, value: "1" },
ConfigDefault { key: Config::FetchExisting, value: "0" },
ConfigDefault { key: Config::FetchExistingMsgs, value: "0" },
]),
strict_tls: false,
oauth2_authorizer: None,