Skip to content

Commit 5925f72

Browse files
authored
fix: remove now redundant "used_account_settings" and "entered_account_settings" from Context.get_info() (#7587)
follow up to #7583
1 parent 8dfa5fc commit 5925f72

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

deltachat-rpc-client/tests/test_something.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,9 @@ def test_lowercase_address(acfactory) -> None:
9090
assert account.get_config("configured_addr") == addr
9191
assert account.list_transports()[0]["addr"] == addr
9292

93-
for param in [
94-
account.get_info()["used_account_settings"],
95-
account.get_info()["entered_account_settings"],
96-
]:
97-
assert addr in param
98-
assert addr_upper not in param
93+
param = account.get_info()["used_transport_settings"]
94+
assert addr in param
95+
assert addr_upper not in param
9996

10097

10198
def test_configure_ip(acfactory) -> None:
@@ -733,7 +730,7 @@ def test_configured_imap_certificate_checks(acfactory):
733730
alice = acfactory.new_configured_account()
734731

735732
# Certificate checks should be configured (not None)
736-
assert "cert_strict" in alice.get_info().used_account_settings
733+
assert "cert_strict" in alice.get_info().used_transport_settings
737734

738735
# "cert_old_automatic" is the value old Delta Chat core versions used
739736
# to mean user entered "imap_certificate_checks=0" (Automatic)
@@ -746,7 +743,7 @@ def test_configured_imap_certificate_checks(acfactory):
746743
#
747744
# Core 1.142.4, 1.142.5 and 1.142.6 saved this value due to bug.
748745
# This test is a regression test to prevent this happening again.
749-
assert "cert_old_automatic" not in alice.get_info().used_account_settings
746+
assert "cert_old_automatic" not in alice.get_info().used_transport_settings
750747

751748

752749
def test_no_old_msg_is_fresh(acfactory):

src/context.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use crate::imap::{FolderMeaning, Imap, ServerMetadata};
2323
use crate::key::self_fingerprint;
2424
use crate::log::warn;
2525
use crate::logged_debug_assert;
26-
use crate::login_param::EnteredLoginParam;
2726
use crate::message::{self, MessageState, MsgId};
2827
use crate::net::tls::TlsSessionStore;
2928
use crate::peer_channels::Iroh;
@@ -816,11 +815,6 @@ impl Context {
816815

817816
/// Returns information about the context as key-value pairs.
818817
pub async fn get_info(&self) -> Result<BTreeMap<&'static str, String>> {
819-
let l = EnteredLoginParam::load(self).await?;
820-
let l2 = ConfiguredLoginParam::load(self).await?.map_or_else(
821-
|| "Not configured".to_string(),
822-
|(_transport_id, param)| param.to_string(),
823-
);
824818
let secondary_addrs = self.get_secondary_self_addrs().await?.join(", ");
825819
let all_transports: Vec<String> = ConfiguredLoginParam::load_all(self)
826820
.await?
@@ -910,8 +904,6 @@ impl Context {
910904
.unwrap_or_else(|| "<unset>".to_string()),
911905
);
912906
res.insert("proxy_enabled", proxy_enabled.to_string());
913-
res.insert("entered_account_settings", l.to_string());
914-
res.insert("used_account_settings", l2);
915907
res.insert("used_transport_settings", all_transports);
916908

917909
if let Some(server_id) = &*self.server_id.read().await {

0 commit comments

Comments
 (0)