diff options
| author | 2025-03-26 15:48:20 +0000 | |
|---|---|---|
| committer | 2025-03-26 15:48:20 +0000 | |
| commit | 4d1be876f8bccf8018728d5ee474f91c256da5c9 (patch) | |
| tree | 87bd55596221246e31b2f13942ce82f1014b146a /stanza/src/client | |
| parent | bf677e1f9ce07e2fa8971c15b9a082cddbb40dec (diff) | |
| download | luz-4d1be876f8bccf8018728d5ee474f91c256da5c9.tar.gz luz-4d1be876f8bccf8018728d5ee474f91c256da5c9.tar.bz2 luz-4d1be876f8bccf8018728d5ee474f91c256da5c9.zip  | |
feat(stanza): feature-gate rfc 6121 jabber:iq:roster
Diffstat (limited to '')
| -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!(),  | 
