aboutsummaryrefslogtreecommitdiffstats
path: root/stanza/src/xep_0203.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stanza/src/xep_0203.rs')
-rw-r--r--stanza/src/xep_0203.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/stanza/src/xep_0203.rs b/stanza/src/xep_0203.rs
index b8f9239..0f4b298 100644
--- a/stanza/src/xep_0203.rs
+++ b/stanza/src/xep_0203.rs
@@ -1,9 +1,10 @@
+// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden>
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
use chrono::{DateTime, Utc};
use jid::JID;
-use peanuts::{
- element::{FromElement, IntoElement},
- Element,
-};
+use peanuts::{Element, FromElement, IntoElement};
pub const XMLNS: &str = "urn:xmpp:delay";
@@ -14,7 +15,7 @@ pub struct Delay {
}
impl FromElement for Delay {
- fn from_element(mut element: Element) -> peanuts::element::DeserializeResult<Self> {
+ fn from_element(mut element: Element) -> peanuts::DeserializeResult<Self> {
element.check_name("delay")?;
element.check_namespace(XMLNS)?;
@@ -26,7 +27,7 @@ impl FromElement for Delay {
}
impl IntoElement for Delay {
- fn builder(&self) -> peanuts::element::ElementBuilder {
+ fn builder(&self) -> peanuts::ElementBuilder {
Element::builder("delay", Some(XMLNS))
.push_attribute_opt("from", self.from.clone())
.push_attribute("stamp", self.stamp.format("%C%y-%m-%dT%H:%M:%S%.3f%:z"))