aboutsummaryrefslogtreecommitdiff
path: root/src/imap/session.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-30 11:28:03 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-30 11:28:03 +0200
commit497ad4b5eae7a2ddf3d7a945313c478d23414249 (patch)
treefa0ca569cfd41a5cc12547f3f83395b6324b9bd7 /src/imap/session.rs
parent4adaa988aa775b0b5303501b3c8c23921b13f76b (diff)
downloadaerogramme-497ad4b5eae7a2ddf3d7a945313c478d23414249.tar.gz
aerogramme-497ad4b5eae7a2ddf3d7a945313c478d23414249.zip
Split out Examined state and add prototypes for IMAP command handlers
Diffstat (limited to 'src/imap/session.rs')
-rw-r--r--src/imap/session.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/imap/session.rs b/src/imap/session.rs
index b7e2059..17753ea 100644
--- a/src/imap/session.rs
+++ b/src/imap/session.rs
@@ -7,7 +7,7 @@ use futures::future::FutureExt;
use tokio::sync::mpsc::error::TrySendError;
use tokio::sync::{mpsc, oneshot};
-use crate::imap::command::{anonymous, authenticated, selected};
+use crate::imap::command::{anonymous, authenticated, selected, examined};
use crate::imap::flow;
use crate::login::ArcLoginProvider;
@@ -127,6 +127,14 @@ impl Instance {
};
selected::dispatch(ctx).await
}
+ flow::State::Examined(ref user, ref mut mailbox) => {
+ let ctx = examined::ExaminedContext {
+ req: &msg.req,
+ user,
+ mailbox,
+ };
+ examined::dispatch(ctx).await
+ }
flow::State::Logout => {
Response::bad("No commands are allowed in the LOGOUT state.")
.map(|r| (r, flow::Transition::None))