From 60a166185a034019d9e55136ee4417386ff57703 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 11 Jan 2024 16:55:37 +0100 Subject: Fetch and store modifiers are parsed --- src/imap/capability.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/imap/capability.rs') 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(), } } } -- cgit v1.2.3