mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-09 21:31:12 +08:00
Do not return change ids in PushSubscription/set
This commit is contained in:
parent
a138fe33d6
commit
791b1e63e8
2 changed files with 4 additions and 12 deletions
|
|
@ -4,9 +4,9 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use super::get::PushSubscriptionFetch;
|
||||||
use base64::{Engine, engine::general_purpose};
|
use base64::{Engine, engine::general_purpose};
|
||||||
use common::{Server, auth::AccessToken};
|
use common::{Server, auth::AccessToken};
|
||||||
|
|
||||||
use email::push::{Keys, PushSubscription};
|
use email::push::{Keys, PushSubscription};
|
||||||
use jmap_proto::{
|
use jmap_proto::{
|
||||||
error::set::SetError,
|
error::set::SetError,
|
||||||
|
|
@ -16,7 +16,6 @@ use jmap_proto::{
|
||||||
collection::Collection,
|
collection::Collection,
|
||||||
date::UTCDate,
|
date::UTCDate,
|
||||||
property::Property,
|
property::Property,
|
||||||
state::State,
|
|
||||||
type_state::DataType,
|
type_state::DataType,
|
||||||
value::{MaybePatchValue, Object, Value},
|
value::{MaybePatchValue, Object, Value},
|
||||||
},
|
},
|
||||||
|
|
@ -31,8 +30,6 @@ use store::{
|
||||||
use trc::AddContext;
|
use trc::AddContext;
|
||||||
use utils::map::bitmap::Bitmap;
|
use utils::map::bitmap::Bitmap;
|
||||||
|
|
||||||
use super::get::PushSubscriptionFetch;
|
|
||||||
|
|
||||||
const EXPIRES_MAX: i64 = 7 * 24 * 3600; // 7 days
|
const EXPIRES_MAX: i64 = 7 * 24 * 3600; // 7 days
|
||||||
const VERIFICATION_CODE_LEN: usize = 32;
|
const VERIFICATION_CODE_LEN: usize = 32;
|
||||||
|
|
||||||
|
|
@ -194,12 +191,7 @@ impl PushSubscriptionSet for Server {
|
||||||
|
|
||||||
// Write changes
|
// Write changes
|
||||||
if !batch.is_empty() {
|
if !batch.is_empty() {
|
||||||
let change_id = self
|
self.commit_batch(batch).await.caused_by(trc::location!())?;
|
||||||
.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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update push subscriptions
|
// Update push subscriptions
|
||||||
|
|
|
||||||
|
|
@ -102,10 +102,10 @@ async fn jmap_tests() {
|
||||||
thread_merge::test(&mut params).await;
|
thread_merge::test(&mut params).await;
|
||||||
mailbox::test(&mut params).await;
|
mailbox::test(&mut params).await;
|
||||||
delivery::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_limits::test(&mut params).await;
|
||||||
auth_oauth::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;
|
push_subscription::test(&mut params).await;
|
||||||
sieve_script::test(&mut params).await;
|
sieve_script::test(&mut params).await;
|
||||||
vacation_response::test(&mut params).await;
|
vacation_response::test(&mut params).await;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue