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) . 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)  and the Entity Capabilities profile specified in Entity Capabilities (XEP-0115) .
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)  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 . 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) , if the message being reacted to does not carry a <no-store/> hint.
If a message is updated using Last Message Correction (XEP-0308) , 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)  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) .
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2018 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 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 <email@example.com> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <firstname.lastname@example.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".
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 http://xmpp.org/extensions/attic/