First draft.
++ 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. +
++ To indicate that a message is a reply, a <reply> element in the urn:xmpp:reply:0 namespace is placed in the + message stanza. The <reply> 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. +
++ To provide a fallback for non-supporting clients, the sending client MAY include fallback text in the body and + indicate it via Compatibility Fallback. +
++ 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. +
+Answers MUST NOT be be assumed to relate to any other messages than the referenced one.
++ 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 + <stanza-id> 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; + <origin-id> if present, or the value of the 'id' attribute on the + <message> otherwise. +
+This document requires no interaction with &IANA;.
+This document requires no interaction with ®ISTRAR;.
+