diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-06 18:01:44 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-06 18:01:44 +0100 |
commit | f58904f5bb3dbd429555c406c867f850654843a6 (patch) | |
tree | 9b5d62e88dce84fe33cfe1f87ef7e3fb3e23cc2e /src/imap/command/examined.rs | |
parent | d495538d55c723d8a088c32327258ce10c555a2e (diff) | |
download | aerogramme-f58904f5bb3dbd429555c406c867f850654843a6.tar.gz aerogramme-f58904f5bb3dbd429555c406c867f850654843a6.zip |
Search can now filter on index data
Diffstat (limited to 'src/imap/command/examined.rs')
-rw-r--r-- | src/imap/command/examined.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/imap/command/examined.rs b/src/imap/command/examined.rs index ec16973..3dd11e2 100644 --- a/src/imap/command/examined.rs +++ b/src/imap/command/examined.rs @@ -111,15 +111,17 @@ impl<'a> ExaminedContext<'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, )) } |