From 6b2c521af924ad1deda42481e4ae455d85c2a8aa Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 27 Feb 2024 14:38:33 +0100 Subject: [PATCH] XEP-xxxx (MDS) use stanza-id element instead of attr --- inbox/xep-mds.xml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/inbox/xep-mds.xml b/inbox/xep-mds.xml index f760769f..e44894a1 100644 --- a/inbox/xep-mds.xml +++ b/inbox/xep-mds.xml @@ -66,20 +66,23 @@

Clients use items in a private PEP (&xep0163;) node called 'urn:xmpp:mds:displayed:0' to synchronize and persist the displayed state (See &xep0223;). The item ID corresponds to the JID of the respective chat. For normal, 1:1 chats this SHOULD be the bare JID of the contact, for group chats this SHOULD be the bare JID of the room and for private messages in group chats the full JID of the participant.

-

The item contains a single <displayed/> element qualified by the 'xrn:xmpp:mds:displayed:0' namespace. The <displayed/> element MUST contain an attribute called 'stanza-id' that corresponds to the stanza-id (&xep0359;) of the most recent, displayed message, in that particular chat.

+

The item contains a single <displayed/> element qualified by the 'xrn:xmpp:mds:displayed:0' namespace. The <displayed/> element MUST contain exactly one &xep0359; <stanza-id/> element that corresponds to the stanza-id of the most recent, displayed message, in that particular chat.

Only messages received by the user (meaning sent by third parties such as a contact, a participant in a group chat, etc) SHOULD be flagged as 'displayed'. However since 'displayed' means all messages up to this point and the stanza-id of a message sent by the user indicates a valid point in the chat history, sent messages MAY be flagged as well.

Flagging a chat as displayed up to this point happens by publishing a PEP item with an id corresponding to the JID of the chat and a <displayed/> payload element into the 'urn:xmpp:mds:displayed:0' node.

-

For group chats the stanza-id attribute of the <displayed/> element refers to the stanza-id injected by the room. For all other chats the stanza-id attribute refers to the stanza-id injected by the user’s server (the server hosting the user account).

+

For group chats the <stanza-id/> child of the <displayed/> element refers to the stanza-id injected by the room. For all other chats the stanza-id child refers to the stanza-id injected by the user’s server (the server hosting the user account).

The client MUST include appropriate publish-options in the publication, including, but not limited to, setting the access model to whitelist and the max-items to max.

- + + + @@ -127,12 +130,18 @@ - + + + + + @@ -172,7 +181,9 @@ - + + + ]]> - + + +