diff options
author | 2025-01-02 17:48:12 +0000 | |
---|---|---|
committer | 2025-01-02 17:48:12 +0000 | |
commit | 0e5f09b2bd05690f3d28f7076629031fcc2cc6e6 (patch) | |
tree | 29409764a94d570c8d9e929f1751a678355cb6ee /stanza/src/client | |
parent | 89351e956368ad3112127570ef03dd2547730ce5 (diff) | |
download | luz-0e5f09b2bd05690f3d28f7076629031fcc2cc6e6.tar.gz luz-0e5f09b2bd05690f3d28f7076629031fcc2cc6e6.tar.bz2 luz-0e5f09b2bd05690f3d28f7076629031fcc2cc6e6.zip |
WIP: client
Diffstat (limited to 'stanza/src/client')
-rw-r--r-- | stanza/src/client/iq.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stanza/src/client/iq.rs b/stanza/src/client/iq.rs index 6ee80ea..2e87636 100644 --- a/stanza/src/client/iq.rs +++ b/stanza/src/client/iq.rs @@ -9,6 +9,7 @@ use peanuts::{ use crate::{ bind::{self, Bind}, client::error::Error, + roster, xep_0199::{self, Ping}, }; @@ -31,6 +32,7 @@ pub struct Iq { pub enum Query { Bind(Bind), Ping(Ping), + Roster(roster::Query), Unsupported, } @@ -39,6 +41,9 @@ impl FromElement for Query { match element.identify() { (Some(bind::XMLNS), "bind") => Ok(Query::Bind(Bind::from_element(element)?)), (Some(xep_0199::XMLNS), "ping") => Ok(Query::Ping(Ping::from_element(element)?)), + (Some(roster::XMLNS), "query") => { + Ok(Query::Roster(roster::Query::from_element(element)?)) + } _ => Ok(Query::Unsupported), } } @@ -49,6 +54,7 @@ impl IntoElement for Query { match self { Query::Bind(bind) => bind.builder(), Query::Ping(ping) => ping.builder(), + Query::Roster(query) => query.builder(), // TODO: consider what to do if attempt to serialize unsupported Query::Unsupported => todo!(), } |