xmpp-parsers: Implement XEP-0490: Message Displayed Synchronization
This XEP is used to synchronize where each client has stopped reading a conversation, so that we can e.g. stop displaying a notification when the user has read this particular message on a different device.
This commit is contained in:
parent
d738939f89
commit
af0bd35e7a
5 changed files with 34 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ XXXX-YY-ZZ RELEASER <admin@example.com>
|
||||||
- Extensible SASL Profile (XEP-0388)
|
- Extensible SASL Profile (XEP-0388)
|
||||||
- SASL Channel-Binding Type Capability (XEP-0440)
|
- SASL Channel-Binding Type Capability (XEP-0440)
|
||||||
- Stream Limits Advertisement (XEP-0478)
|
- Stream Limits Advertisement (XEP-0478)
|
||||||
|
- Message Displayed Synchronization (XEP-0490)
|
||||||
- RFC 6120 stream errors
|
- RFC 6120 stream errors
|
||||||
* Improvements:
|
* Improvements:
|
||||||
- Add support for `<optional/> in XEP-0198 feature advertisment
|
- Add support for `<optional/> in XEP-0198 feature advertisment
|
||||||
|
|
|
||||||
|
|
@ -674,6 +674,14 @@
|
||||||
<xmpp:since>0.21.0</xmpp:since>
|
<xmpp:since>0.21.0</xmpp:since>
|
||||||
</xmpp:SupportedXep>
|
</xmpp:SupportedXep>
|
||||||
</implements>
|
</implements>
|
||||||
|
<implements>
|
||||||
|
<xmpp:SupportedXep>
|
||||||
|
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0490.html"/>
|
||||||
|
<xmpp:status>complete</xmpp:status>
|
||||||
|
<xmpp:version>1.0.1</xmpp:version>
|
||||||
|
<xmpp:since>NEXT</xmpp:since>
|
||||||
|
</xmpp:SupportedXep>
|
||||||
|
</implements>
|
||||||
|
|
||||||
<release>
|
<release>
|
||||||
<Version>
|
<Version>
|
||||||
|
|
|
||||||
|
|
@ -290,3 +290,6 @@ pub mod stream_limits;
|
||||||
|
|
||||||
/// XEP-0484: Fast Authentication Streamlining Tokens
|
/// XEP-0484: Fast Authentication Streamlining Tokens
|
||||||
pub mod fast;
|
pub mod fast;
|
||||||
|
|
||||||
|
/// XEP-0490: Message Displayed Synchronization
|
||||||
|
pub mod message_displayed;
|
||||||
|
|
|
||||||
19
parsers/src/message_displayed.rs
Normal file
19
parsers/src/message_displayed.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
// Copyright (c) 2024 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
||||||
|
//
|
||||||
|
// 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,
|
||||||
|
}
|
||||||
|
|
@ -308,6 +308,9 @@ pub const STREAM_LIMITS: &str = "urn:xmpp:stream-limits:0";
|
||||||
/// XEP-0484: Fast Authentication Streamlining Tokens
|
/// XEP-0484: Fast Authentication Streamlining Tokens
|
||||||
pub const FAST: &str = "urn:xmpp:fast:0";
|
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
|
/// Alias for the main namespace of the stream, that is "jabber:client" when
|
||||||
/// the component feature isn’t enabled.
|
/// the component feature isn’t enabled.
|
||||||
#[cfg(not(feature = "component"))]
|
#[cfg(not(feature = "component"))]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue