diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-12 17:32:57 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-12 17:32:57 +0200 |
commit | 7959adb8e970c9006ea9799b5ddd6b2c9aac217a (patch) | |
tree | 92f1a3b952e1e46de061c935e37bf6d2e5766a1c /src/imap/command/selected.rs | |
parent | 23e0eff42b905c636274e82850429e073a730159 (diff) | |
download | aerogramme-7959adb8e970c9006ea9799b5ddd6b2c9aac217a.tar.gz aerogramme-7959adb8e970c9006ea9799b5ddd6b2c9aac217a.zip |
implement STORE
Diffstat (limited to 'src/imap/command/selected.rs')
-rw-r--r-- | src/imap/command/selected.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs index 848302c..a6fa645 100644 --- a/src/imap/command/selected.rs +++ b/src/imap/command/selected.rs @@ -67,13 +67,21 @@ impl<'a> SelectedContext<'a> { async fn store( self, - _sequence_set: &SequenceSet, - _kind: &StoreType, - _response: &StoreResponse, - _flags: &[Flag], - _uid: &bool, + sequence_set: &SequenceSet, + kind: &StoreType, + response: &StoreResponse, + flags: &[Flag], + uid: &bool, ) -> Result<(Response, flow::Transition)> { - Ok((Response::bad("Not implemented")?, flow::Transition::None)) + let data = self + .mailbox + .store(sequence_set, kind, response, flags, uid) + .await?; + + Ok(( + Response::ok("STORE completed")?.with_body(data), + flow::Transition::None, + )) } async fn copy( |