Message reactions allow to express an opinion or feeling towards a message in a quick and light-weight way. Reactions are described in the form of emojis and can enhance communication especially when chatting with multiple parties. Other possible uses include voting and checking to-do list items.
Reactions are typically displayed in a summarizing fashion visually attached to the message they belong to.
Related work has been done in Message Attaching (XEP-0367) [1]. However, it can't be used for reactions, as it would cause difficulties with non-supporting clients, is not tailored to emojis and does not specify removal of reactions. To solve these issues, this XEP introduces a separate XML element for reactions.
If a client implements message reactions, it MUST specify the 'urn:xmpp:reactions:0' feature in its service discovery information features as specified in Service Discovery (XEP-0030) [2] and the Entity Capabilities profile specified in Entity Capabilities (XEP-0115) [3].
When a user chooses to react to a message with a certain emoji, the client sends a <message> stanza containing a <reactions> element. The chosen emoji is included in a <reaction> element within the <reactions> element. The message is referred to by including its id or in MUCs its stanza-id as defined in Unique and Stable Stanza IDs (XEP-0359) [4] in the 'id' attribute of the reactions element.
If the user chooses to remove reactions from or add reactions to a message they have already reacted to, the client sends a <message> with all <reaction> elements that are (still or newly) applicable to that message.
In order to remove all reactions from a message, an empty <reactions> element is sent.
Messages MUST NOT contain more then one <reactions> element
A message containing a <reactions> element SHOULD be of type 'chat' or 'groupchat'.
A <reaction> element SHOULD only contain Unicode codepoints that can be displayed as a single emoji, as specified in the latest revision of the Unicode® Technical Standard #51 [5]. Receiving entities MAY ignore <reaction> elements that do not comply with this specification.
A receiving client SHOULD show reactions attached to the message they where in response to. Reactions MAY be displayed in a summarized fashion.
A <reactions> element MUST NOT contain the same reaction more than once. A receiving entity SHOULD ignore duplicate reactions inside a <reactions> element.
The sending entity SHOULD add a <store/> hint, as defined in Message Processing Hints (XEP-0334) [6], if the message being reacted to does not carry a <no-store/> hint.
If a message is updated using Last Message Correction (XEP-0308) [7], the 'id' attribute of the <reactions> element SHOULD reference the original message id. A receiving entity SHOULD accept messages with a <reactions> element referencing a message correction and SHOULD handle such element as if it was using the message id of the original message.
In direct conversations, a reaction MUST only be accepted if the senders bare JID matches the bare JID of any of the two involved parties.
In MUCs and MUC PMs, the recipient SHOULD ensure that the real bare JID of the sending occupant did not already send a reaction to that message to accept it as a new reaction, e.g. by keeping track of leave/join presences since the message was send. This implies that in semi-anonymous MUCs it MAY be impossible to attach reactions to a message received from the history. A reaction MAY still be a valid reaction update (as per the next paragraph) if it was not accepted as a new reaction.
A reaction MUST only be considered an update if it orignates from the same sender as a previous reaction message. In direct conversations, this means the bare JID MUST match the original bare JID. In MUCs and MUC PMs the senders full JID MAY not match the original full JID, but the recipient MUST ensure that the real bare JID of the sending occupant is the same as the real bare JID of the previous reaction message, e.g. by keeping track of leave/join presences.
If a message containing a <reactions> element arrives delayed, which means it carries a <delay/> element, as defined in Delayed Delivery (XEP-0203) [8] it SHOULD only be accepted, if no newer reaction from the same sender was already accepted.
For messages of type 'groupchat', the stanza's 'id' attribute MUST NOT be used for reactions. 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 Unique and Stable Stanza IDs (XEP-0359) [4].
This implies that group chat messages without a Unique and Stable Stanza IDs (XEP-0359) [4] stanza-id cannot be reacted to.
For other message types the sender should use the 'id' from a Unique and Stable Stanza IDs (XEP-0359) [4] <origin-id> if present, or the value of the 'id' attribute on the <message> otherwise.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [9].
The XMPP Registrar [10] includes 'urn:xmpp:reactions:0' in its registry of protocol namespaces (see <https://xmpp.org/registrar/namespaces.html>).
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0367: Message Attaching <https://xmpp.org/extensions/xep-0367.html>.
2. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.
3. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.
4. XEP-0359: Unique and Stable Stanza IDs <https://xmpp.org/extensions/xep-0359.html>.
5. Unicode® Technical Standard #51 <http://www.unicode.org/reports/tr51/>.
6. XEP-0334: Message Processing Hints <https://xmpp.org/extensions/xep-0334.html>.
7. XEP-0308: Last Message Correction <https://xmpp.org/extensions/xep-0308.html>.
8. XEP-0203: Delayed Delivery <https://xmpp.org/extensions/xep-0203.html>.
9. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
10. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
First draft.
@report{wirth2019reactions, title = {Message Reactions}, author = {Wirth, Natalie and Wissfeld, Marvin}, type = {XEP}, number = {0444}, version = {0.1.1}, institution = {XMPP Standards Foundation}, url = {https://xmpp.org/extensions/xep-0444.html}, date = {2019-07-14/2022-12-30}, }
END