aboutsummaryrefslogtreecommitdiffstats
path: root/stanza
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-02-18 11:39:19 +0000
committerLibravatar cel 🌸 <cel@bunny.garden>2025-02-18 11:39:19 +0000
commitc0d2aae0385aee7f1bb2ecb330e72e40b8fde6a2 (patch)
treec4ee54c64a2d8c0adf222dce5a334502453de473 /stanza
parent945f1406165aa58414c0374a1ba984a1d6d896c6 (diff)
downloadluz-c0d2aae0385aee7f1bb2ecb330e72e40b8fde6a2.tar.gz
luz-c0d2aae0385aee7f1bb2ecb330e72e40b8fde6a2.tar.bz2
luz-c0d2aae0385aee7f1bb2ecb330e72e40b8fde6a2.zip
implement handle_online() and handle_offline() for CommandMessage
Diffstat (limited to 'stanza')
-rw-r--r--stanza/src/client/message.rs20
-rw-r--r--stanza/src/client/presence.rs22
2 files changed, 21 insertions, 21 deletions
diff --git a/stanza/src/client/message.rs b/stanza/src/client/message.rs
index 2337d7b..703b80b 100644
--- a/stanza/src/client/message.rs
+++ b/stanza/src/client/message.rs
@@ -10,16 +10,16 @@ use super::XMLNS;
#[derive(Debug)]
pub struct Message {
- from: Option<JID>,
- id: Option<String>,
- to: Option<JID>,
+ pub from: Option<JID>,
+ pub id: Option<String>,
+ pub to: Option<JID>,
// can be omitted, if so default to normal
- r#type: MessageType,
- lang: Option<String>,
+ pub r#type: MessageType,
+ pub lang: Option<String>,
// children
- subject: Option<Subject>,
- body: Option<Body>,
- thread: Option<Thread>,
+ pub subject: Option<Subject>,
+ pub body: Option<Body>,
+ pub thread: Option<Thread>,
}
impl FromElement for Message {
@@ -109,8 +109,8 @@ impl ToString for MessageType {
#[derive(Clone, Debug)]
pub struct Body {
- lang: Option<String>,
- body: Option<String>,
+ pub lang: Option<String>,
+ pub body: Option<String>,
}
impl FromElement for Body {
diff --git a/stanza/src/client/presence.rs b/stanza/src/client/presence.rs
index 877c4c6..ff7ba24 100644
--- a/stanza/src/client/presence.rs
+++ b/stanza/src/client/presence.rs
@@ -10,18 +10,18 @@ use super::{error::Error, XMLNS};
#[derive(Debug)]
pub struct Presence {
- from: Option<JID>,
- id: Option<String>,
- to: Option<JID>,
- r#type: Option<PresenceType>,
- lang: Option<String>,
+ pub from: Option<JID>,
+ pub id: Option<String>,
+ pub to: Option<JID>,
+ pub r#type: Option<PresenceType>,
+ pub lang: Option<String>,
// children
- show: Option<Show>,
- status: Option<Status>,
- priority: Option<Priority>,
+ pub show: Option<Show>,
+ pub status: Option<Status>,
+ pub priority: Option<Priority>,
// TODO: ##other
// other: Vec<Other>,
- errors: Vec<Error>,
+ pub errors: Vec<Error>,
}
impl FromElement for Presence {
@@ -165,8 +165,8 @@ impl ToString for Show {
#[derive(Clone, Debug)]
pub struct Status {
- lang: Option<String>,
- status: String1024,
+ pub lang: Option<String>,
+ pub status: String1024,
}
impl FromElement for Status {