diff options
Diffstat (limited to 'stanza/src/client')
| -rw-r--r-- | stanza/src/client/iq.rs | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/stanza/src/client/iq.rs b/stanza/src/client/iq.rs index 41f87fd..6d0c671 100644 --- a/stanza/src/client/iq.rs +++ b/stanza/src/client/iq.rs @@ -9,9 +9,11 @@ use peanuts::{  use crate::{      bind::{self, Bind},      client::error::Error, -    roster,  }; +#[cfg(feature = "rfc_6121")] +use crate::roster; +  #[cfg(feature = "xep_0030")]  use crate::xep_0030::{self, info, items}; @@ -42,6 +44,7 @@ pub enum Query {      DiscoItems(items::Query),      #[cfg(feature = "xep_0199")]      Ping(Ping), +    #[cfg(feature = "rfc_6121")]      Roster(roster::Query),      Unsupported,  } @@ -52,6 +55,7 @@ impl FromElement for Query {              (Some(bind::XMLNS), "bind") => Ok(Query::Bind(Bind::from_element(element)?)),              #[cfg(feature = "xep_0199")]              (Some(xep_0199::XMLNS), "ping") => Ok(Query::Ping(Ping::from_element(element)?)), +            #[cfg(feature = "rfc_6121")]              (Some(roster::XMLNS), "query") => {                  Ok(Query::Roster(roster::Query::from_element(element)?))              } @@ -74,6 +78,7 @@ impl IntoElement for Query {              Query::Bind(bind) => bind.builder(),              #[cfg(feature = "xep_0199")]              Query::Ping(ping) => ping.builder(), +            #[cfg(feature = "rfc_6121")]              Query::Roster(query) => query.builder(),              // TODO: consider what to do if attempt to serialize unsupported              Query::Unsupported => todo!(), | 
