From 91f1994af940085d5d475a97820900ebbf0eb553 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 3 Apr 2025 03:41:38 +0100 Subject: feat: better message handling, pep publish, xep_0172: nick --- filamento/src/presence.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'filamento/src/presence.rs') diff --git a/filamento/src/presence.rs b/filamento/src/presence.rs index e35761c..bae8793 100644 --- a/filamento/src/presence.rs +++ b/filamento/src/presence.rs @@ -78,11 +78,6 @@ impl Online { timestamp: Option>, ) -> stanza::client::presence::Presence { stanza::client::presence::Presence { - from: None, - id: None, - to: None, - r#type: None, - lang: None, show: self.show.map(|show| match show { Show::Away => stanza::client::presence::Show::Away, Show::Chat => stanza::client::presence::Show::Chat, @@ -97,11 +92,11 @@ impl Online { priority: self .priority .map(|priority| stanza::client::presence::Priority(priority)), - errors: Vec::new(), delay: timestamp.map(|timestamp| Delay { from: None, stamp: timestamp, }), + ..Default::default() } } } @@ -112,22 +107,16 @@ impl Offline { timestamp: Option>, ) -> stanza::client::presence::Presence { stanza::client::presence::Presence { - from: None, - id: None, - to: None, r#type: Some(stanza::client::presence::PresenceType::Unavailable), - lang: None, - show: None, status: self.status.map(|status| stanza::client::presence::Status { lang: None, status: String1024(status), }), - priority: None, - errors: Vec::new(), delay: timestamp.map(|timestamp| Delay { from: None, stamp: timestamp, }), + ..Default::default() } } } -- cgit