diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-22 17:31:03 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-22 17:31:03 +0100 |
commit | 9b26e251e3d6d7b850064a2c1ed5bb5870918f1e (patch) | |
tree | a90c8adb0a97e7e58c90727d7ad7419a5fa0ccd6 /src/imap/command | |
parent | 2adf73dd8e6e76997d4fb67f9f7b3fe065530722 (diff) | |
download | aerogramme-9b26e251e3d6d7b850064a2c1ed5bb5870918f1e.tar.gz aerogramme-9b26e251e3d6d7b850064a2c1ed5bb5870918f1e.zip |
formatting
Diffstat (limited to 'src/imap/command')
-rw-r--r-- | src/imap/command/authenticated.rs | 11 | ||||
-rw-r--r-- | src/imap/command/selected.rs | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs index 129c2fd..eb8833d 100644 --- a/src/imap/command/authenticated.rs +++ b/src/imap/command/authenticated.rs @@ -6,7 +6,7 @@ use anyhow::{anyhow, bail, Result}; use imap_codec::imap_types::command::{ Command, CommandBody, ListReturnItem, SelectExamineModifier, }; -use imap_codec::imap_types::core::{Atom, Literal, Vec1, QuotedChar}; +use imap_codec::imap_types::core::{Atom, Literal, QuotedChar, Vec1}; use imap_codec::imap_types::datetime::DateTime; use imap_codec::imap_types::extensions::enable::CapabilityEnable; use imap_codec::imap_types::flag::{Flag, FlagNameAttribute}; @@ -14,12 +14,12 @@ use imap_codec::imap_types::mailbox::{ListMailbox, Mailbox as MailboxCodec}; use imap_codec::imap_types::response::{Code, CodeOther, Data}; use imap_codec::imap_types::status::{StatusDataItem, StatusDataItemName}; -use crate::imap::Body; use crate::imap::capability::{ClientCapability, ServerCapability}; use crate::imap::command::{anystate, MailboxName}; use crate::imap::flow; use crate::imap::mailbox_view::{MailboxView, UpdateParameters}; use crate::imap::response::Response; +use crate::imap::Body; use crate::mail::uidindex::*; use crate::mail::user::{User, MAILBOX_HIERARCHY_DELIMITER as MBX_HIER_DELIM_RAW}; @@ -560,8 +560,6 @@ impl<'a> AuthenticatedContext<'a> { ) -> Result<(Response<'static>, flow::Transition)> { let append_tag = self.req.tag.clone(); match self.append_internal(mailbox, flags, date, message).await { - - Ok((_mb_view, uidvalidity, uid, _modseq)) => Ok(( Response::build() .tag(append_tag) @@ -623,8 +621,9 @@ impl<'a> AuthenticatedContext<'a> { let flags = flags.iter().map(|x| x.to_string()).collect::<Vec<_>>(); // TODO: filter allowed flags? ping @Quentin - let (uidvalidity, uid, modseq) = view.internal.mailbox.append(msg, None, &flags[..]).await?; - //let unsollicited = view.update(UpdateParameters::default()).await?; + let (uidvalidity, uid, modseq) = + view.internal.mailbox.append(msg, None, &flags[..]).await?; + //let unsollicited = view.update(UpdateParameters::default()).await?; Ok((view, uidvalidity, uid, modseq)) } diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs index e871509..d000905 100644 --- a/src/imap/command/selected.rs +++ b/src/imap/command/selected.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use anyhow::Result; use imap_codec::imap_types::command::{Command, CommandBody, FetchModifier, StoreModifier}; -use imap_codec::imap_types::core::{Vec1, Charset}; +use imap_codec::imap_types::core::{Charset, Vec1}; use imap_codec::imap_types::fetch::MacroOrMessageDataItemNames; use imap_codec::imap_types::flag::{Flag, StoreResponse, StoreType}; use imap_codec::imap_types::mailbox::Mailbox as MailboxCodec; @@ -59,7 +59,10 @@ pub async fn dispatch<'a>( charset, criteria, uid, - } => ctx.search(charset, &SearchKey::And(criteria.clone()), uid).await, + } => { + ctx.search(charset, &SearchKey::And(criteria.clone()), uid) + .await + } CommandBody::Expunge { // UIDPLUS (rfc4315) uid_sequence_set, |