feat: Remove QR code tokens sync compatibility code

Remove compatibility code needed for Core <= v1.143, Core 1.144 was released on 2024-09-21.
This commit is contained in:
iequidoo
2026-02-09 10:33:30 -03:00
committed by iequidoo
parent 0622289420
commit 3c4ce17f1e
2 changed files with 1 additions and 43 deletions

View File

@@ -789,19 +789,7 @@ mod tests {
let bob = &tcm.bob().await;
tcm.exec_securejoin_qr(bob, alice, &qr).await;
let msg_id = alice.send_sync_msg().await?;
// Core <= v1.143 doesn't sync QR code tokens immediately, so current Core does that when a
// group is promoted for compatibility (because the group could be created by older Core).
// TODO: assert!(msg_id.is_none());
assert!(msg_id.is_some());
let sent = alice.pop_sent_msg().await;
let msg = alice.parse_msg(&sent).await;
let mut sync_items = msg.sync_items.unwrap().items;
assert_eq!(sync_items.len(), 1);
let data = sync_items.pop().unwrap().data;
let SyncDataOrUnknown::SyncData(AddQrToken(_)) = data else {
unreachable!();
};
assert!(alice.send_sync_msg().await?.is_none());
// Remove Bob because alice2 doesn't have their key.
let alice_bob_id = alice.add_or_lookup_contact(bob).await.id;