Skip to content

Commit ae4f1f3

Browse files
committed
api!: remove deprecated verified_one_on_one_chats config
1 parent d509b0c commit ae4f1f3

File tree

6 files changed

+45
-115
lines changed

6 files changed

+45
-115
lines changed

deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def __init__(self, deltachat: DeltaChat) -> None:
2929
def get_unconfigured_account(self) -> Account:
3030
"""Create a new unconfigured account."""
3131
account = self.deltachat.add_account()
32-
account.set_config("verified_one_on_one_chats", "1")
3332
return account
3433

3534
def get_unconfigured_bot(self) -> Bot:

src/config.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,6 @@ pub enum Config {
413413
#[strum(props(default = "172800"))]
414414
GossipPeriod,
415415

416-
/// Deprecated 2025-07. Feature flag for verified 1:1 chats; the UI should set it
417-
/// to 1 if it supports verified 1:1 chats.
418-
/// Regardless of this setting, `chat.is_protected()` returns true while the key is verified,
419-
/// and when the key changes, an info message is posted into the chat.
420-
/// 0=Nothing else happens when the key changes.
421-
/// 1=After the key changed, `can_send()` returns false
422-
/// until `chat_id.accept()` is called.
423-
#[strum(props(default = "0"))]
424-
VerifiedOneOnOneChats,
425-
426416
/// Row ID of the key in the `keypairs` table
427417
/// used for signatures, encryption to self and included in `Autocrypt` header.
428418
KeyId,

src/context.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,12 +1054,6 @@ impl Context {
10541054
"gossip_period",
10551055
self.get_config_int(Config::GossipPeriod).await?.to_string(),
10561056
);
1057-
res.insert(
1058-
"verified_one_on_one_chats", // deprecated 2025-07
1059-
self.get_config_bool(Config::VerifiedOneOnOneChats)
1060-
.await?
1061-
.to_string(),
1062-
);
10631057
res.insert(
10641058
"webxdc_realtime_enabled",
10651059
self.get_config_bool(Config::WebxdcRealtimeEnabled)

src/imex.rs

Lines changed: 45 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -928,75 +928,56 @@ mod tests {
928928

929929
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
930930
async fn test_export_and_import_backup() -> Result<()> {
931-
for set_verified_oneonone_chats in [true, false] {
932-
let backup_dir = tempfile::tempdir().unwrap();
933-
934-
let context1 = TestContext::new_alice().await;
935-
assert!(context1.is_configured().await?);
936-
if set_verified_oneonone_chats {
937-
context1
938-
.set_config_bool(Config::VerifiedOneOnOneChats, true)
939-
.await?;
940-
}
931+
let backup_dir = tempfile::tempdir().unwrap();
941932

942-
let context2 = TestContext::new().await;
943-
assert!(!context2.is_configured().await?);
944-
assert!(has_backup(&context2, backup_dir.path()).await.is_err());
933+
let context1 = TestContext::new_alice().await;
934+
assert!(context1.is_configured().await?);
945935

946-
// export from context1
947-
assert!(
948-
imex(&context1, ImexMode::ExportBackup, backup_dir.path(), None)
949-
.await
950-
.is_ok()
951-
);
952-
let _event = context1
953-
.evtracker
954-
.get_matching(|evt| matches!(evt, EventType::ImexProgress(1000)))
955-
.await;
956-
957-
// import to context2
958-
let backup = has_backup(&context2, backup_dir.path()).await?;
959-
960-
// Import of unencrypted backup with incorrect "foobar" backup passphrase fails.
961-
assert!(
962-
imex(
963-
&context2,
964-
ImexMode::ImportBackup,
965-
backup.as_ref(),
966-
Some("foobar".to_string())
967-
)
936+
let context2 = TestContext::new().await;
937+
assert!(!context2.is_configured().await?);
938+
assert!(has_backup(&context2, backup_dir.path()).await.is_err());
939+
940+
// export from context1
941+
assert!(
942+
imex(&context1, ImexMode::ExportBackup, backup_dir.path(), None)
968943
.await
969-
.is_err()
970-
);
944+
.is_ok()
945+
);
946+
let _event = context1
947+
.evtracker
948+
.get_matching(|evt| matches!(evt, EventType::ImexProgress(1000)))
949+
.await;
971950

972-
assert!(
973-
imex(&context2, ImexMode::ImportBackup, backup.as_ref(), None)
974-
.await
975-
.is_ok()
976-
);
977-
let _event = context2
978-
.evtracker
979-
.get_matching(|evt| matches!(evt, EventType::ImexProgress(1000)))
980-
.await;
951+
// import to context2
952+
let backup = has_backup(&context2, backup_dir.path()).await?;
981953

982-
assert!(context2.is_configured().await?);
983-
assert_eq!(
984-
context2.get_config(Config::Addr).await?,
985-
Some("[email protected]".to_string())
986-
);
987-
assert_eq!(
988-
context2
989-
.get_config_bool(Config::VerifiedOneOnOneChats)
990-
.await?,
991-
false
992-
);
993-
assert_eq!(
994-
context1
995-
.get_config_bool(Config::VerifiedOneOnOneChats)
996-
.await?,
997-
set_verified_oneonone_chats
998-
);
999-
}
954+
// Import of unencrypted backup with incorrect "foobar" backup passphrase fails.
955+
assert!(
956+
imex(
957+
&context2,
958+
ImexMode::ImportBackup,
959+
backup.as_ref(),
960+
Some("foobar".to_string())
961+
)
962+
.await
963+
.is_err()
964+
);
965+
966+
assert!(
967+
imex(&context2, ImexMode::ImportBackup, backup.as_ref(), None)
968+
.await
969+
.is_ok()
970+
);
971+
let _event = context2
972+
.evtracker
973+
.get_matching(|evt| matches!(evt, EventType::ImexProgress(1000)))
974+
.await;
975+
976+
assert!(context2.is_configured().await?);
977+
assert_eq!(
978+
context2.get_config(Config::Addr).await?,
979+
Some("[email protected]".to_string())
980+
);
1000981
Ok(())
1001982
}
1002983

src/securejoin/securejoin_tests.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ async fn test_setup_contact_ex(case: SetupContactCase) {
7272
}
7373
_ => alice_auto_submitted_hdr = "Auto-Submitted: auto-replied",
7474
};
75-
for t in [&alice, &bob] {
76-
t.set_config_bool(Config::VerifiedOneOnOneChats, true)
77-
.await
78-
.unwrap();
79-
}
8075

8176
assert_eq!(
8277
Chatlist::try_load(&alice, 0, None, None)
@@ -702,11 +697,6 @@ async fn test_lost_contact_confirm() {
702697
let mut tcm = TestContextManager::new();
703698
let alice = tcm.alice().await;
704699
let bob = tcm.bob().await;
705-
for t in [&alice, &bob] {
706-
t.set_config_bool(Config::VerifiedOneOnOneChats, true)
707-
.await
708-
.unwrap();
709-
}
710700

711701
let qr = get_securejoin_qr(&alice, None).await.unwrap();
712702
join_securejoin(&bob.ctx, &qr).await.unwrap();

src/tests/verified_chats.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ async fn check_verified_oneonone_chat_protection_not_broken(by_classical_email:
3535
let mut tcm = TestContextManager::new();
3636
let alice = tcm.alice().await;
3737
let bob = tcm.bob().await;
38-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
3938

4039
tcm.execute_securejoin(&alice, &bob).await;
4140

@@ -89,7 +88,6 @@ async fn test_create_verified_oneonone_chat() -> Result<()> {
8988
let alice = tcm.alice().await;
9089
let bob = tcm.bob().await;
9190
let fiona = tcm.fiona().await;
92-
enable_verified_oneonone_chats(&[&alice, &bob, &fiona]).await;
9391

9492
tcm.execute_securejoin(&alice, &bob).await;
9593
tcm.execute_securejoin(&bob, &fiona).await;
@@ -151,7 +149,6 @@ async fn test_create_verified_oneonone_chat() -> Result<()> {
151149
drop(fiona);
152150

153151
let fiona_new = tcm.unconfigured().await;
154-
enable_verified_oneonone_chats(&[&fiona_new]).await;
155152
fiona_new.configure_addr("[email protected]").await;
156153
e2ee::ensure_secret_key_exists(&fiona_new).await?;
157154

@@ -181,7 +178,6 @@ async fn test_missing_key_reexecute_securejoin() -> Result<()> {
181178
let mut tcm = TestContextManager::new();
182179
let alice = &tcm.alice().await;
183180
let bob = &tcm.bob().await;
184-
enable_verified_oneonone_chats(&[alice, bob]).await;
185181
let chat_id = tcm.execute_securejoin(bob, alice).await;
186182
let chat = Chat::load_from_db(bob, chat_id).await?;
187183
assert!(chat.is_protected());
@@ -206,7 +202,6 @@ async fn test_create_unverified_oneonone_chat() -> Result<()> {
206202
let mut tcm = TestContextManager::new();
207203
let alice = tcm.alice().await;
208204
let bob = tcm.bob().await;
209-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
210205

211206
// A chat with an unknown contact should be created unprotected
212207
let chat = alice.create_chat(&bob).await;
@@ -246,7 +241,6 @@ async fn test_degrade_verified_oneonone_chat() -> Result<()> {
246241
let mut tcm = TestContextManager::new();
247242
let alice = tcm.alice().await;
248243
let bob = tcm.bob().await;
249-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
250244

251245
mark_as_verified(&alice, &bob).await;
252246

@@ -361,7 +355,6 @@ async fn test_mdn_doesnt_disable_verification() -> Result<()> {
361355
let mut tcm = TestContextManager::new();
362356
let alice = tcm.alice().await;
363357
let bob = tcm.bob().await;
364-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
365358
bob.set_config_bool(Config::MdnsEnabled, true).await?;
366359

367360
// Alice & Bob verify each other
@@ -386,7 +379,6 @@ async fn test_outgoing_mua_msg() -> Result<()> {
386379
let mut tcm = TestContextManager::new();
387380
let alice = tcm.alice().await;
388381
let bob = tcm.bob().await;
389-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
390382

391383
mark_as_verified(&alice, &bob).await;
392384
mark_as_verified(&bob, &alice).await;
@@ -423,7 +415,6 @@ async fn test_outgoing_encrypted_msg() -> Result<()> {
423415
let mut tcm = TestContextManager::new();
424416
let alice = &tcm.alice().await;
425417
let bob = &tcm.bob().await;
426-
enable_verified_oneonone_chats(&[alice]).await;
427418

428419
mark_as_verified(alice, bob).await;
429420
let chat_id = alice.create_chat(bob).await.id;
@@ -449,7 +440,6 @@ async fn test_reply() -> Result<()> {
449440
let mut tcm = TestContextManager::new();
450441
let alice = tcm.alice().await;
451442
let bob = tcm.bob().await;
452-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
453443

454444
if verified {
455445
mark_as_verified(&alice, &bob).await;
@@ -492,7 +482,6 @@ async fn test_message_from_old_dc_setup() -> Result<()> {
492482
let alice = &tcm.alice().await;
493483
let bob_old = &tcm.unconfigured().await;
494484

495-
enable_verified_oneonone_chats(&[alice, bob_old]).await;
496485
bob_old.configure_addr("[email protected]").await;
497486
mark_as_verified(bob_old, alice).await;
498487
let chat = bob_old.create_chat(alice).await;
@@ -503,7 +492,6 @@ async fn test_message_from_old_dc_setup() -> Result<()> {
503492

504493
tcm.section("Bob reinstalls DC");
505494
let bob = &tcm.bob().await;
506-
enable_verified_oneonone_chats(&[bob]).await;
507495

508496
mark_as_verified(alice, bob).await;
509497
mark_as_verified(bob, alice).await;
@@ -535,7 +523,6 @@ async fn test_verify_then_verify_again() -> Result<()> {
535523
let mut tcm = TestContextManager::new();
536524
let alice = tcm.alice().await;
537525
let bob = tcm.bob().await;
538-
enable_verified_oneonone_chats(&[&alice, &bob]).await;
539526

540527
mark_as_verified(&alice, &bob).await;
541528
mark_as_verified(&bob, &alice).await;
@@ -546,7 +533,6 @@ async fn test_verify_then_verify_again() -> Result<()> {
546533
tcm.section("Bob reinstalls DC");
547534
drop(bob);
548535
let bob_new = tcm.unconfigured().await;
549-
enable_verified_oneonone_chats(&[&bob_new]).await;
550536
bob_new.configure_addr("[email protected]").await;
551537
e2ee::ensure_secret_key_exists(&bob_new).await?;
552538

@@ -599,7 +585,6 @@ async fn test_verified_member_added_reordering() -> Result<()> {
599585
let alice = &tcm.alice().await;
600586
let bob = &tcm.bob().await;
601587
let fiona = &tcm.fiona().await;
602-
enable_verified_oneonone_chats(&[alice, bob, fiona]).await;
603588

604589
let alice_fiona_contact_id = alice.add_or_lookup_contact_id(fiona).await;
605590

@@ -651,7 +636,6 @@ async fn test_no_unencrypted_name_if_encrypted() -> Result<()> {
651636
bob.set_config(Config::Displayname, Some("Bob Smith"))
652637
.await?;
653638
if verified {
654-
enable_verified_oneonone_chats(&[&bob]).await;
655639
mark_as_verified(&bob, &alice).await;
656640
} else {
657641
tcm.send_recv_accept(&alice, &bob, "hi").await;
@@ -882,11 +866,3 @@ async fn assert_verified(this: &TestContext, other: &TestContext, protected: Pro
882866
protected == ProtectionStatus::Protected
883867
);
884868
}
885-
886-
async fn enable_verified_oneonone_chats(test_contexts: &[&TestContext]) {
887-
for t in test_contexts {
888-
t.set_config_bool(Config::VerifiedOneOnOneChats, true)
889-
.await
890-
.unwrap()
891-
}
892-
}

0 commit comments

Comments
 (0)