diff options
Diffstat (limited to 'stanza')
-rw-r--r-- | stanza/Cargo.toml | 2 | ||||
-rw-r--r-- | stanza/src/client/iq.rs | 13 | ||||
-rw-r--r-- | stanza/src/xep_0060/owner.rs | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/stanza/Cargo.toml b/stanza/Cargo.toml index 69fabc2..e4eb302 100644 --- a/stanza/Cargo.toml +++ b/stanza/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -peanuts = { version = "0.1.0", path = "../../peanuts" } +peanuts = { version = "0.1.0", git = "https://bunny.garden/peanuts" } jid = { version = "0.1.0", path = "../jid" } thiserror = "2.0.11" chrono = { version = "0.4.40", optional = true } 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(), } } } diff --git a/stanza/src/xep_0060/owner.rs b/stanza/src/xep_0060/owner.rs index 1fedc60..7cf4355 100644 --- a/stanza/src/xep_0060/owner.rs +++ b/stanza/src/xep_0060/owner.rs @@ -198,8 +198,8 @@ impl IntoElement for Default { #[derive(Clone, Debug)] pub struct Delete { - node: String, - redirect: Option<Redirect>, + pub node: String, + pub redirect: Option<Redirect>, } impl FromElement for Delete { |