aboutsummaryrefslogtreecommitdiffstats
path: root/stanza/src/client/iq.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-04-03 03:41:38 +0100
committerLibravatar cel 🌸 <cel@bunny.garden>2025-04-03 03:41:38 +0100
commit91f1994af940085d5d475a97820900ebbf0eb553 (patch)
tree6aab872f71d17a785d3d9286742fef38983d274c /stanza/src/client/iq.rs
parent9ce3827a7d25714d17f266f0f50bb29f41090175 (diff)
downloadluz-91f1994af940085d5d475a97820900ebbf0eb553.tar.gz
luz-91f1994af940085d5d475a97820900ebbf0eb553.tar.bz2
luz-91f1994af940085d5d475a97820900ebbf0eb553.zip
feat: better message handling, pep publish, xep_0172: nick
Diffstat (limited to 'stanza/src/client/iq.rs')
-rw-r--r--stanza/src/client/iq.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/stanza/src/client/iq.rs b/stanza/src/client/iq.rs
index 6d0c671..50884aa 100644
--- a/stanza/src/client/iq.rs
+++ b/stanza/src/client/iq.rs
@@ -17,6 +17,9 @@ use crate::roster;
#[cfg(feature = "xep_0030")]
use crate::xep_0030::{self, info, items};
+#[cfg(feature = "xep_0060")]
+use crate::xep_0060::pubsub::{self, Pubsub};
+
#[cfg(feature = "xep_0199")]
use crate::xep_0199::{self, Ping};
@@ -42,6 +45,8 @@ pub enum Query {
DiscoInfo(info::Query),
#[cfg(feature = "xep_0030")]
DiscoItems(items::Query),
+ #[cfg(feature = "xep_0060")]
+ Pubsub(Pubsub),
#[cfg(feature = "xep_0199")]
Ping(Ping),
#[cfg(feature = "rfc_6121")]
@@ -67,6 +72,8 @@ impl FromElement for Query {
(Some(xep_0030::items::XMLNS), "query") => {
Ok(Query::DiscoItems(items::Query::from_element(element)?))
}
+ #[cfg(feature = "xep_0060")]
+ (Some(pubsub::XMLNS), "pubsub") => Ok(Query::Pubsub(Pubsub::from_element(element)?)),
_ => Ok(Query::Unsupported),
}
}
@@ -86,6 +93,8 @@ impl IntoElement for Query {
Query::DiscoInfo(query) => query.builder(),
#[cfg(feature = "xep_0030")]
Query::DiscoItems(query) => query.builder(),
+ #[cfg(feature = "xep_0060")]
+ Query::Pubsub(pubsub) => pubsub.builder(),
}
}
}