export: a dry run no longer claims the default address book

When export created a default address book, it went on to send
AddressBook/set with onSuccessSetIsDefault -- in a dry run too, naming the
dry run's made-up id. A dry run writes nothing; the claim is now only
counted as planned.
This commit is contained in:
2026-09-30 12:46:38 -07:00
parent 3f832e17b2
commit 1d63dfe25e
+5
View File
@@ -1,5 +1,6 @@
/* /*
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]> * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
* SPDX-FileCopyrightText: 2026 John Coffey <[email protected]>
* *
* SPDX-License-Identifier: Apache-2.0 OR MIT * SPDX-License-Identifier: Apache-2.0 OR MIT
*/ */
@@ -108,6 +109,10 @@ pub fn reconcile(
ty.jmap_name(), ty.jmap_name(),
id id
)); ));
} else if net.dry_run {
// The object only exists in the plan; claiming the
// default would be a write.
default_claimed = true;
} else { } else {
let mut req = crate::jmap::request::Request::new(); let mut req = crate::jmap::request::Request::new();
req.call( req.call(