From 396104af4764d73c9dd0bc67f93c41dfb0a8b3e0 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 5 Feb 2026 17:36:56 +0000 Subject: [PATCH] feat: do not require ShowEmails to be set to All for adding second relay --- deltachat-rpc-client/tests/test_multitransport.py | 11 +++++------ src/config.rs | 7 +------ src/configure.rs | 5 ----- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/deltachat-rpc-client/tests/test_multitransport.py b/deltachat-rpc-client/tests/test_multitransport.py index 1a2ab6daa..7db031854 100644 --- a/deltachat-rpc-client/tests/test_multitransport.py +++ b/deltachat-rpc-client/tests/test_multitransport.py @@ -38,8 +38,8 @@ def test_add_second_address(acfactory) -> None: with pytest.raises(JsonRpcError): account.set_config(option, "1") - with pytest.raises(JsonRpcError): - account.set_config("show_emails", "0") + # show_emails does not matter for multi-relay, can be set to anything + account.set_config("show_emails", "0") @pytest.mark.parametrize("key", ["mvbox_move", "only_fetch_mvbox"]) @@ -58,8 +58,8 @@ def test_no_second_transport_with_mvbox(acfactory, key) -> None: account.add_transport_from_qr(qr) -def test_no_second_transport_without_classic_emails(acfactory) -> None: - """Test that second transport cannot be configured if classic emails are not fetched.""" +def test_second_transport_without_classic_emails(acfactory) -> None: + """Test that second transport can be configured if classic emails are not fetched.""" account = acfactory.new_configured_account() assert len(account.list_transports()) == 1 @@ -68,8 +68,7 @@ def test_no_second_transport_without_classic_emails(acfactory) -> None: qr = acfactory.get_account_qr() account.set_config("show_emails", "0") - with pytest.raises(JsonRpcError): - account.add_transport_from_qr(qr) + account.add_transport_from_qr(qr) def test_change_address(acfactory) -> None: diff --git a/src/config.rs b/src/config.rs index 63ed201c9..d7757144d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -712,12 +712,7 @@ impl Context { Self::check_config(key, value)?; let n_transports = self.count_transports().await?; - if n_transports > 1 - && matches!( - key, - Config::MvboxMove | Config::OnlyFetchMvbox | Config::ShowEmails - ) - { + if n_transports > 1 && matches!(key, Config::MvboxMove | Config::OnlyFetchMvbox) { bail!("Cannot reconfigure {key} when multiple transports are configured"); } diff --git a/src/configure.rs b/src/configure.rs index a3137be24..5040aac6f 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -286,11 +286,6 @@ impl Context { "To use additional relays, disable the legacy option \"Settings / Advanced / Move automatically to DeltaChat Folder\"." ); } - if self.get_config(Config::ShowEmails).await?.as_deref() != Some("2") { - bail!( - "To use additional relays, set the legacy option \"Settings / Advanced / Show Classic Emails\" to \"All\"." - ); - } if self .sql