Import upstream v0.16.22, stripped
Upstream commit: 474dd0229cb20cf513036619781ed97bd8073c3f Enterprise-only files removed or emptied: 63 Enterprise-only snippets removed: 117 in 50 files Dangling module declarations removed: 5 Cargo edits turning enterprise off: 14 Verification: clean Enterprise feature gates left for rebuilt features: 19 in 18 files Produced by tools/fork/strip.py. The full report is in docs/fork/strip-reports/ on main.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
use std::time::Instant;
|
||||
|
||||
use crate::core::{Session, State};
|
||||
use common::network::SessionStream;
|
||||
use imap_proto::{Command, StatusResponse, receiver::Request};
|
||||
|
||||
impl<T: SessionStream> Session<T> {
|
||||
pub async fn handle_noop(&mut self, request: Request<Command>) -> trc::Result<()> {
|
||||
let op_start = Instant::now();
|
||||
|
||||
if let State::Selected { data, mailbox, .. } = &self.state {
|
||||
data.write_changes(
|
||||
&Some(mailbox.clone()),
|
||||
false,
|
||||
true,
|
||||
self.is_qresync || self.is_uidonly,
|
||||
self.is_uidonly,
|
||||
self.version.is_rev2(),
|
||||
self.is_utf8,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
trc::event!(
|
||||
Imap(trc::ImapEvent::Noop),
|
||||
SpanId = self.session_id,
|
||||
Elapsed = op_start.elapsed()
|
||||
);
|
||||
|
||||
self.write_bytes(
|
||||
StatusResponse::completed(request.command)
|
||||
.with_tag(request.tag)
|
||||
.into_bytes(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user