From 791b1e63e80811f82761a82828ce1b2e5b1ca572 Mon Sep 17 00:00:00 2001 From: mdecimus Date: Fri, 23 May 2025 13:09:25 +0200 Subject: [PATCH] Do not return change ids in PushSubscription/set --- crates/jmap/src/push/set.rs | 12 ++---------- tests/src/jmap/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/crates/jmap/src/push/set.rs b/crates/jmap/src/push/set.rs index f944f977..9b28dd1c 100644 --- a/crates/jmap/src/push/set.rs +++ b/crates/jmap/src/push/set.rs @@ -4,9 +4,9 @@ * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL */ +use super::get::PushSubscriptionFetch; use base64::{Engine, engine::general_purpose}; use common::{Server, auth::AccessToken}; - use email::push::{Keys, PushSubscription}; use jmap_proto::{ error::set::SetError, @@ -16,7 +16,6 @@ use jmap_proto::{ collection::Collection, date::UTCDate, property::Property, - state::State, type_state::DataType, value::{MaybePatchValue, Object, Value}, }, @@ -31,8 +30,6 @@ use store::{ use trc::AddContext; use utils::map::bitmap::Bitmap; -use super::get::PushSubscriptionFetch; - const EXPIRES_MAX: i64 = 7 * 24 * 3600; // 7 days const VERIFICATION_CODE_LEN: usize = 32; @@ -194,12 +191,7 @@ impl PushSubscriptionSet for Server { // Write changes if !batch.is_empty() { - let change_id = self - .commit_batch(batch) - .await - .and_then(|ids| ids.last_change_id(account_id)) - .caused_by(trc::location!())?; - response.new_state = State::Exact(change_id).into(); + self.commit_batch(batch).await.caused_by(trc::location!())?; } // Update push subscriptions diff --git a/tests/src/jmap/mod.rs b/tests/src/jmap/mod.rs index a56d793f..befc598b 100644 --- a/tests/src/jmap/mod.rs +++ b/tests/src/jmap/mod.rs @@ -102,10 +102,10 @@ async fn jmap_tests() { thread_merge::test(&mut params).await; mailbox::test(&mut params).await; delivery::test(&mut params).await; - auth_acl::test(&mut params).await;*/ + auth_acl::test(&mut params).await; auth_limits::test(&mut params).await; auth_oauth::test(&mut params).await; - event_source::test(&mut params).await; + event_source::test(&mut params).await;*/ push_subscription::test(&mut params).await; sieve_script::test(&mut params).await; vacation_response::test(&mut params).await;