Add ProtoXEP: Message Replies

This commit is contained in:
Marvin W 2022-01-01 17:49:01 +01:00
parent 7f99862d20
commit f7fc745563
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
1 changed files with 125 additions and 0 deletions

inbox/replies.xml Normal file
View File

@ -0,0 +1,125 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<title>Message Replies</title>
This document defines a way to indicate that a message is a reply to a previous message.
<type>Standards Track</type>
<p>First draft.</p>
<section1 topic='Introduction' anchor='intro'>
When commenting on a previous message, it is sometimes desired to clarify which message the comment refers to.
Currently, &xep0393; quotes are commonly used for that purpose. However, this format does not allow receiving
clients to properly identify the referenced message or to adjust the user interface accordingly.
This specification defines a way to indicate that a message is a reply to a previous message. It does not intend
to provide means to create sub-threads for a message.
<section1 topic='Use Cases' anchor='usecases'>
To indicate that a message is a reply, a &lt;reply&gt; element in the urn:xmpp:reply:0 namespace is placed in the
message stanza. The &lt;reply&gt; element has a 'to' attribute containing the full jid of the author of the
referenced message and an 'id' attribute containing the id of the referenced message.
<example caption="Max replies to Anna's message"><![CDATA[
<message to='' from='' id='message-id1' type='chat'>
<body>We should bake a cake</body>
<message to='' id='message-id2' type='chat'>
<body>Great idea!</body>
<reply to='' id='message-id1' xmlns='urn:xmpp:reply:0' />
<section2 topic='Compatibility Fallback' anchor='compat'>
To provide a fallback for non-supporting clients, the sending client MAY include fallback text in the body and
indicate it via Compatibility Fallback.
<example caption="Anna replies to a message and includes a fallback"><![CDATA[
<message to='' id='message-id3' type='chat'>
> Anna wrote:
> We should bake a cake
Great idea!
<reply to='' id='message-id1' xmlns='urn:xmpp:reply:0' />
<fallback xmlns='urn:xmpp:feature-fallback:0' for='urn:xmpp:reply:0'>
<body start="0" end="36" />
The receiving client SHOULD NOT display the compatibility fallback if it renders the referenced message
alongside the reply in some way. However, if the receiving client does not display the referenced message, for
example because it doesn't know the referenced id, it MAY display the compatibility fallback instead.
<section1 topic='Business Rules' anchor='rules'>
<p>Answers MUST NOT be be assumed to relate to any other messages than the referenced one.</p>
<section2 topic='Using the correct ID' anchor='business-id'>
For messages of type 'groupchat', the stanza's 'id' attribute MUST NOT be used for replies. Instead, in group
chat situations, the ID assigned to the stanza by the group chat itself must be used. This is discovered in a
&lt;stanza-id&gt; element with a 'by' attribute that matches the bare JID of the group chat, as defined
in &xep0359;.
This implies that group chat messages without a &xep0359; stanza-id cannot be replied to.
For other message types the sender should use the 'id' from a &xep0359;
&lt;origin-id&gt; if present, or the value of the 'id' attribute on the
&lt;message&gt; otherwise.
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>This document requires no interaction with &REGISTRAR;.</p>