diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-05 12:40:49 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-05 12:40:49 +0100 |
commit | 35591ff0608096b32d7bab22d719a6ceb8574c2c (patch) | |
tree | 362178f0c136610bfab3b1d6de867f0888aef4fa /src/imap/command/selected.rs | |
parent | ac8fb89d56351fbc0017b8a7a8a4ddf53217ab60 (diff) | |
download | aerogramme-35591ff0608096b32d7bab22d719a6ceb8574c2c.tar.gz aerogramme-35591ff0608096b32d7bab22d719a6ceb8574c2c.zip |
search first ultra minimal implementation
Diffstat (limited to 'src/imap/command/selected.rs')
-rw-r--r-- | src/imap/command/selected.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs index c8cc680..933f397 100644 --- a/src/imap/command/selected.rs +++ b/src/imap/command/selected.rs @@ -136,15 +136,17 @@ impl<'a> SelectedContext<'a> { pub async fn search( self, - _charset: &Option<Charset<'a>>, - _criteria: &SearchKey<'a>, - _uid: &bool, + charset: &Option<Charset<'a>>, + criteria: &SearchKey<'a>, + uid: &bool, ) -> Result<(Response<'static>, flow::Transition)> { + let found = self.mailbox.search(charset, criteria, *uid).await?; Ok(( Response::build() .to_req(self.req) - .message("Not implemented") - .bad()?, + .set_body(found) + .message("SEARCH completed") + .ok()?, flow::Transition::None, )) } |