aboutsummaryrefslogtreecommitdiff
path: root/src/imap/capability.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-11 16:55:37 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-11 16:55:37 +0100
commit60a166185a034019d9e55136ee4417386ff57703 (patch)
treeaf515bc47372e7979562b4a3f41f8d87b15ca049 /src/imap/capability.rs
parenta9d33c67080fd08b057501c36a07fade351bd83d (diff)
downloadaerogramme-60a166185a034019d9e55136ee4417386ff57703.tar.gz
aerogramme-60a166185a034019d9e55136ee4417386ff57703.zip
Fetch and store modifiers are parsed
Diffstat (limited to 'src/imap/capability.rs')
-rw-r--r--src/imap/capability.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/imap/capability.rs b/src/imap/capability.rs
index 37f14df..53d7b7d 100644
--- a/src/imap/capability.rs
+++ b/src/imap/capability.rs
@@ -1,4 +1,5 @@
-use imap_codec::imap_types::core::{Atom, NonEmptyVec};
+use imap_codec::imap_types::command::SelectExamineModifier;
+use imap_codec::imap_types::core::NonEmptyVec;
use imap_codec::imap_types::extensions::enable::{CapabilityEnable, Utf8Kind};
use imap_codec::imap_types::response::Capability;
use std::collections::HashSet;
@@ -90,10 +91,10 @@ impl ClientCapability {
self.condstore = self.condstore.enable();
}
- pub fn select_enable(&mut self, atoms: &[Atom]) {
- for at in atoms.iter() {
- if at.as_ref().to_uppercase() == "CONDSTORE" {
- self.enable_condstore();
+ pub fn select_enable(&mut self, mods: &[SelectExamineModifier]) {
+ for m in mods.iter() {
+ match m {
+ SelectExamineModifier::Condstore => self.enable_condstore(),
}
}
}