From c0d2aae0385aee7f1bb2ecb330e72e40b8fde6a2 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Tue, 18 Feb 2025 11:39:19 +0000 Subject: implement handle_online() and handle_offline() for CommandMessage --- stanza/src/client/message.rs | 20 ++++++++++---------- stanza/src/client/presence.rs | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'stanza') 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, - id: Option, - to: Option, + pub from: Option, + pub id: Option, + pub to: Option, // can be omitted, if so default to normal - r#type: MessageType, - lang: Option, + pub r#type: MessageType, + pub lang: Option, // children - subject: Option, - body: Option, - thread: Option, + pub subject: Option, + pub body: Option, + pub thread: Option, } impl FromElement for Message { @@ -109,8 +109,8 @@ impl ToString for MessageType { #[derive(Clone, Debug)] pub struct Body { - lang: Option, - body: Option, + pub lang: Option, + pub body: Option, } 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, - id: Option, - to: Option, - r#type: Option, - lang: Option, + pub from: Option, + pub id: Option, + pub to: Option, + pub r#type: Option, + pub lang: Option, // children - show: Option, - status: Option, - priority: Option, + pub show: Option, + pub status: Option, + pub priority: Option, // TODO: ##other // other: Vec, - errors: Vec, + pub errors: Vec, } impl FromElement for Presence { @@ -165,8 +165,8 @@ impl ToString for Show { #[derive(Clone, Debug)] pub struct Status { - lang: Option, - status: String1024, + pub lang: Option, + pub status: String1024, } impl FromElement for Status { -- cgit