diff --git a/parsers/ChangeLog b/parsers/ChangeLog index 003492bd..de221154 100644 --- a/parsers/ChangeLog +++ b/parsers/ChangeLog @@ -30,6 +30,7 @@ XXXX-YY-ZZ RELEASER - Extensible SASL Profile (XEP-0388) - SASL Channel-Binding Type Capability (XEP-0440) - Stream Limits Advertisement (XEP-0478) + - Message Displayed Synchronization (XEP-0490) - RFC 6120 stream errors * Improvements: - Add support for ` in XEP-0198 feature advertisment diff --git a/parsers/doap.xml b/parsers/doap.xml index 6d8250c9..719c130d 100644 --- a/parsers/doap.xml +++ b/parsers/doap.xml @@ -674,6 +674,14 @@ 0.21.0 + + + + complete + 1.0.1 + NEXT + + diff --git a/parsers/src/lib.rs b/parsers/src/lib.rs index d7920089..56864d9e 100644 --- a/parsers/src/lib.rs +++ b/parsers/src/lib.rs @@ -290,3 +290,6 @@ pub mod stream_limits; /// XEP-0484: Fast Authentication Streamlining Tokens pub mod fast; + +/// XEP-0490: Message Displayed Synchronization +pub mod message_displayed; diff --git a/parsers/src/message_displayed.rs b/parsers/src/message_displayed.rs new file mode 100644 index 00000000..0d1e6b4b --- /dev/null +++ b/parsers/src/message_displayed.rs @@ -0,0 +1,19 @@ +// Copyright (c) 2024 Emmanuel Gil Peyrot +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +use xso::{AsXml, FromXml}; + +use crate::ns; +use crate::stanza_id::StanzaId; + +/// Mention that a particular message has been displayed by at least one client. +#[derive(FromXml, AsXml, PartialEq, Debug, Clone)] +#[xml(namespace = ns::MDS, name = "displayed")] +pub struct Displayed { + /// Reference to the message having been displayed. + #[xml(child)] + pub stanza_id: StanzaId, +} diff --git a/parsers/src/ns.rs b/parsers/src/ns.rs index 25a46e7a..da2abc5f 100644 --- a/parsers/src/ns.rs +++ b/parsers/src/ns.rs @@ -308,6 +308,9 @@ pub const STREAM_LIMITS: &str = "urn:xmpp:stream-limits:0"; /// XEP-0484: Fast Authentication Streamlining Tokens pub const FAST: &str = "urn:xmpp:fast:0"; +/// XEP-0490: Message Displayed Synchronization +pub const MDS: &str = "urn:xmpp:mds:displayed:0"; + /// Alias for the main namespace of the stream, that is "jabber:client" when /// the component feature isn’t enabled. #[cfg(not(feature = "component"))]