diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-03 12:29:19 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-03 12:29:19 +0100 |
commit | 6d37924399dd5d04f5be2506e3e044dd165f6399 (patch) | |
tree | 9d6030ed892dbf2518bf5fea5bd323ce9cfed6e8 /src/imap/command/authenticated.rs | |
parent | a059585cb423d527763ef0131773d6620ebcafd5 (diff) | |
download | aerogramme-6d37924399dd5d04f5be2506e3e044dd165f6399.tar.gz aerogramme-6d37924399dd5d04f5be2506e3e044dd165f6399.zip |
rework capability
Diffstat (limited to 'src/imap/command/authenticated.rs')
-rw-r--r-- | src/imap/command/authenticated.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs index 1bb4c6d..a6a5203 100644 --- a/src/imap/command/authenticated.rs +++ b/src/imap/command/authenticated.rs @@ -14,6 +14,7 @@ use crate::imap::command::{anystate, MailboxName}; use crate::imap::flow; use crate::imap::mailbox_view::MailboxView; use crate::imap::response::Response; +use crate::imap::capability::ServerCapability; use crate::mail::mailbox::Mailbox; use crate::mail::uidindex::*; @@ -22,6 +23,7 @@ use crate::mail::IMF; pub struct AuthenticatedContext<'a> { pub req: &'a Command<'static>, + pub server_capabilities: &'a ServerCapability, pub user: &'a Arc<User>, } @@ -31,7 +33,9 @@ pub async fn dispatch<'a>( match &ctx.req.body { // Any state CommandBody::Noop => anystate::noop_nothing(ctx.req.tag.clone()), - CommandBody::Capability => anystate::capability(ctx.req.tag.clone()), + CommandBody::Capability => anystate::capability( + ctx.req.tag.clone(), + ctx.server_capabilities), CommandBody::Logout => anystate::logout(), // Specific to this state (11 commands) |