aboutsummaryrefslogtreecommitdiff
path: root/src/imap/command
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 12:55:38 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 12:55:38 +0100
commit51510c97f7b76a73a2032eb089552cf9a13e9274 (patch)
tree76f45feb92e6e86de09f117d4a41710d35091c4b /src/imap/command
parenta2d6efc962dbf5de64a70cf7d9f293534bd5369a (diff)
downloadaerogramme-51510c97f7b76a73a2032eb089552cf9a13e9274.tar.gz
aerogramme-51510c97f7b76a73a2032eb089552cf9a13e9274.zip
fix some logic error in the internals
Diffstat (limited to 'src/imap/command')
-rw-r--r--src/imap/command/authenticated.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs
index 5af8e98..f083ac8 100644
--- a/src/imap/command/authenticated.rs
+++ b/src/imap/command/authenticated.rs
@@ -507,7 +507,7 @@ 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, uidvalidity, uid)) => Ok((
+ Ok((_mb, uidvalidity, uid, _modseq)) => Ok((
Response::build()
.tag(append_tag)
.message("APPEND completed")
@@ -548,7 +548,7 @@ impl<'a> AuthenticatedContext<'a> {
flags: &[Flag<'a>],
date: &Option<DateTime>,
message: &Literal<'a>,
- ) -> Result<(Arc<Mailbox>, ImapUidvalidity, ImapUidvalidity)> {
+ ) -> Result<(Arc<Mailbox>, ImapUidvalidity, ImapUid, ModSeq)> {
let name: &str = MailboxName(mailbox).try_into()?;
let mb_opt = self.user.open_mailbox(&name).await?;
@@ -566,9 +566,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) = mb.append(msg, None, &flags[..]).await?;
+ let (uidvalidity, uid, modseq) = mb.append(msg, None, &flags[..]).await?;
- Ok((mb, uidvalidity, uid))
+ Ok((mb, uidvalidity, uid, modseq))
}
}