diff options
Diffstat (limited to 'stanza/src/client/iq.rs')
-rw-r--r-- | stanza/src/client/iq.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/stanza/src/client/iq.rs b/stanza/src/client/iq.rs index 50884aa..a1d58f6 100644 --- a/stanza/src/client/iq.rs +++ b/stanza/src/client/iq.rs @@ -18,7 +18,10 @@ use crate::roster; use crate::xep_0030::{self, info, items}; #[cfg(feature = "xep_0060")] -use crate::xep_0060::pubsub::{self, Pubsub}; +use crate::xep_0060::{ + self, + pubsub::{self, Pubsub}, +}; #[cfg(feature = "xep_0199")] use crate::xep_0199::{self, Ping}; @@ -47,6 +50,8 @@ pub enum Query { DiscoItems(items::Query), #[cfg(feature = "xep_0060")] Pubsub(Pubsub), + #[cfg(feature = "xep_0060")] + PubsubOwner(xep_0060::owner::Pubsub), #[cfg(feature = "xep_0199")] Ping(Ping), #[cfg(feature = "rfc_6121")] @@ -74,6 +79,10 @@ impl FromElement for Query { } #[cfg(feature = "xep_0060")] (Some(pubsub::XMLNS), "pubsub") => Ok(Query::Pubsub(Pubsub::from_element(element)?)), + #[cfg(feature = "xep_0060")] + (Some(xep_0060::owner::XMLNS), "pubsub") => Ok(Query::PubsubOwner( + xep_0060::owner::Pubsub::from_element(element)?, + )), _ => Ok(Query::Unsupported), } } @@ -95,6 +104,8 @@ impl IntoElement for Query { Query::DiscoItems(query) => query.builder(), #[cfg(feature = "xep_0060")] Query::Pubsub(pubsub) => pubsub.builder(), + #[cfg(feature = "xep_0060")] + Query::PubsubOwner(pubsub) => pubsub.builder(), } } } |