aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src/disco.rs
diff options
context:
space:
mode:
Diffstat (limited to 'filamento/src/disco.rs')
-rw-r--r--filamento/src/disco.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/filamento/src/disco.rs b/filamento/src/disco.rs
index cc48215..580f647 100644
--- a/filamento/src/disco.rs
+++ b/filamento/src/disco.rs
@@ -6,9 +6,9 @@ pub use identity::Identity;
#[derive(Debug, Clone)]
pub struct Info {
- node: Option<String>,
- features: Vec<Feature>,
- identities: Vec<Identity>,
+ pub node: Option<String>,
+ pub features: Vec<String>,
+ pub identities: Vec<Identity>,
}
impl From<info::Query> for Info {
@@ -16,7 +16,7 @@ impl From<info::Query> for Info {
let features = value
.features
.into_iter()
- .map(|feature| feature.into())
+ .map(|feature| feature.var)
.collect();
let identities = value
.identities
@@ -37,7 +37,7 @@ impl From<Info> for info::Query {
let features = value
.features
.into_iter()
- .map(|feature| feature.into())
+ .map(|feature| info::Feature { var: feature })
.collect();
let identities = value
.identities
@@ -49,6 +49,7 @@ impl From<Info> for info::Query {
node: value.node,
features,
identities,
+ extensions: Vec::new(),
}
}
}
@@ -108,7 +109,7 @@ impl From<Item> for items::Item {
}
}
-mod feature {
+pub mod feature {
use stanza::xep_0030::info;
// https://xmpp.org/registrar/disco-features.html
@@ -1061,13 +1062,13 @@ mod feature {
}
}
-mod identity {
+pub mod identity {
use stanza::xep_0030::info;
#[derive(Debug, Clone)]
pub struct Identity {
- name: Option<String>,
- category: Category,
+ pub name: Option<String>,
+ pub category: Category,
}
impl From<info::Identity> for Identity {
@@ -1086,6 +1087,7 @@ mod identity {
category: value.category.to_string(),
name: value.name,
r#type: value.category.r#type(),
+ lang: None,
}
}
}