XEP-0107: User Mood

This specification defines a payload format for communicating information about user moods, such as whether a person is currently happy, sad, angry, or annoyed. The payload format is typically transported using the personal eventing protocol, a profile of XMPP publish-subscribe specified in XEP-0163.
  • Peter Saint-Andre
  • Ralph Meijer
© 2003 – 2024 XMPP Standards Foundation. SEE LEGAL NOTICES.


NOTICE: The protocol defined herein is a Stable Standard of the XMPP Standards Foundation. Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.
Standards Track
1.2.2 (2024-06-20)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

This document defines an extension mechanism for capturing "extended presence" data about user moods.

2. Protocol

2.1 Data Format

Information about user moods is provided by the user and propagated on the network by the user's client. The information is structured via a <mood/> element that is qualified by the 'http://jabber.org/protocol/mood' namespace. The mood itself is provided as the element name of a defined child element of the <mood/> element (e.g., <happy/>); one such child element is REQUIRED. The user MAY also specify a natural-language description of, or reason for, the mood in the <text/> child of the <mood/> element, which is OPTIONAL. Here is an example:

<mood xmlns='http://jabber.org/protocol/mood'>
  <text>Yay, the mood spec has been approved!</text>

In addition, an application MAY provide a more specific mood value as a properly-namespaced child of the defined element, which extension MUST be ignored if the receiving application does not understand the extended namespace. Here is an example:

<mood xmlns='http://jabber.org/protocol/mood'>
    <ecstatic xmlns='https://example.org/'/>
  <text>Yay, the mood spec has been approved!</text>

2.2 Pubsub Transport

Mood information SHOULD be communicated and transported by means of the Publish-Subscribe (XEP-0060) [1] subset specified in Personal Eventing Protocol (XEP-0163) [2]. Because mood information is not pure presence information and can change independently of the user's availability, it SHOULD NOT be provided as an extension to <presence/>.

Example 1. User Publishes Mood
<iq from='juliet@capulet.lit/balcony'
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='http://jabber.org/protocol/mood'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <text>curse my nurse!</text>

The mood is then delivered to all subscribers:

Example 2. Mood is Delivered to All Subscribers
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='http://jabber.org/protocol/mood'>
      <item id='a475804a-0f9c-11dc-98a8-001143d5d5db'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <text>curse my nurse!</text>

In order to indicate that the user is no longer publishing moods, the user's client shall send an empty <mood/> element, which can be considered a "stop command" for user moods:

Example 3. User Disables Publishing
<iq from='juliet@capulet.lit/balcony'
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='http://jabber.org/protocol/mood'>
        <mood xmlns='http://jabber.org/protocol/mood'/>
Example 4. Empty Mood Information is Delivered to All Subscribers
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='http://jabber.org/protocol/mood'>
      <item id='a475804a-0f9c-11dc-98a8-001143d5d5db'>
        <mood xmlns='http://jabber.org/protocol/mood'/>

2.3 Including a Mood in a IM Message

A user MAY provide a mood extension in a specific IM message in order to lend a defined emotional tone to text of that particular message. (This does not override the user's more general mood and is not intended to replace PEP as a more general transport method for user moods.)

Example 5. User Provides Mood in Message
<message from='romeo@montague.lit/pda'
  <body>A thousand times good night!</body>
  <mood xmlns='http://jabber.org/protocol/mood'>

3. Mood Values

There exist various theories of human affect, mood, and emotion, including those promulgated by Frijda [3], Ortony et al. [4], and Wierzbicka [5]. The taxonomy provided here mostly follows the Affective Knowledge Representation that has been defined by Lisetti [6] in an effort to harmonize the prevailing theories in this area, as well as some work by Wierzbicka on cross-cultural studies of emotion. [7] Furthermore, the taxonomy provided here includes a number of common physical states in addition to moods, and also takes into account the specific context of instant messaging, including work done by other standards development organizations (e.g., the Wireless Village specifications contributed to the Open Mobile Alliance (OMA) [8]) and instant messaging service providers (e.g., ICQ). Finally, lists of moods and physical states have been checked for commonality against studies of word frequency in the English language. [9] to remove rarely used terms.

The following mood values are defined in this taxonomy. Where available as linked below, the definitions are obtained from Wiktionary.

4. Mapping to Wireless Village Moods

The Wireless Village (now "IMPS") specifications for mobile instant messaging define a number of presence attributes, encapsulated in the "StatusMood" information element [10]. The following values are defined for StatusMood in Wireless Village, all of which map one-to-one from Wireless Village to the same values (albeit lowercase) in Jabber:

The full range of moods defined herein is richer than that defined in Wireless Village; no mapping is provided by this specification for mood values that are not present in Wireless Village, and any such mapping is the responsibility of a gateway between the two systems.

5. Internationalization Considerations

The XML character data values of the <value/> elements is not intended to be presented to a human user and thus there is no special reason to include an 'xml:lang' attribute unless the sender includes a <text/> element as well (as explained in RFC 2277 [11], "internationalization is for humans"). It is the responsibility of the receiving application to provide localized text strings associated with the XML character data values defined herein, or some other appropriate presentation (e.g., graphical images that represent the mood).

6. Security Considerations

Because user moods may be published to a large number of pubsub subscribers, users should take care in approving subscribers and in characterizing their current moods.

7. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [12].

8. XMPP Registrar Considerations

8.1 Protocol Namespaces

The XMPP Registrar [13] includes 'http://jabber.org/protocol/mood' in its registry of protocol namespaces.

9. XML Schema

<?xml version='1.0' encoding='UTF-8'?>


  <xs:element name='mood'>
	<xs:choice minOccurs='0'>
          <xs:element name='afraid' type='empty'/>
          <xs:element name='amazed' type='empty'/>
          <xs:element name='angry' type='empty'/>
          <xs:element name='amorous' type='empty'/>
          <xs:element name='annoyed' type='empty'/>
          <xs:element name='anxious' type='empty'/>
          <xs:element name='aroused' type='empty'/>
          <xs:element name='ashamed' type='empty'/>
          <xs:element name='bored' type='empty'/>
          <xs:element name='brave' type='empty'/>
          <xs:element name='calm' type='empty'/>
          <xs:element name='cautious' type='empty'/>
          <xs:element name='cold' type='empty'/>
          <xs:element name='confident' type='empty'/>
          <xs:element name='confused' type='empty'/>
          <xs:element name='contemplative' type='empty'/>
          <xs:element name='contented' type='empty'/>
          <xs:element name='cranky' type='empty'/>
          <xs:element name='crazy' type='empty'/>
          <xs:element name='creative' type='empty'/>
          <xs:element name='curious' type='empty'/>
          <xs:element name='dejected' type='empty'/>
          <xs:element name='depressed' type='empty'/>
          <xs:element name='disappointed' type='empty'/>
          <xs:element name='disgusted' type='empty'/>
          <xs:element name='dismayed' type='empty'/>
          <xs:element name='distracted' type='empty'/>
          <xs:element name='embarrassed' type='empty'/>
          <xs:element name='envious' type='empty'/>
          <xs:element name='excited' type='empty'/>
          <xs:element name='flirtatious' type='empty'/>
          <xs:element name='frustrated' type='empty'/>
          <xs:element name='grumpy' type='empty'/>
          <xs:element name='guilty' type='empty'/>
          <xs:element name='happy' type='empty'/>
          <xs:element name='hopeful' type='empty'/>
          <xs:element name='hot' type='empty'/>
          <xs:element name='humbled' type='empty'/>
          <xs:element name='humiliated' type='empty'/>
          <xs:element name='hungry' type='empty'/>
          <xs:element name='hurt' type='empty'/>
          <xs:element name='impressed' type='empty'/>
          <xs:element name='in_awe' type='empty'/>
          <xs:element name='in_love' type='empty'/>
          <xs:element name='indignant' type='empty'/>
          <xs:element name='interested' type='empty'/>
          <xs:element name='intoxicated' type='empty'/>
          <xs:element name='invincible' type='empty'/>
          <xs:element name='jealous' type='empty'/>
          <xs:element name='lonely' type='empty'/>
          <xs:element name='lucky' type='empty'/>
          <xs:element name='mean' type='empty'/>
          <xs:element name='moody' type='empty'/>
          <xs:element name='nervous' type='empty'/>
          <xs:element name='neutral' type='empty'/>
          <xs:element name='offended' type='empty'/>
          <xs:element name='outraged' type='empty'/>
          <xs:element name='playful' type='empty'/>
          <xs:element name='proud' type='empty'/>
          <xs:element name='relaxed' type='empty'/>
          <xs:element name='relieved' type='empty'/>
          <xs:element name='remorseful' type='empty'/>
          <xs:element name='restless' type='empty'/>
          <xs:element name='sad' type='empty'/>
          <xs:element name='sarcastic' type='empty'/>
          <xs:element name='serious' type='empty'/>
          <xs:element name='shocked' type='empty'/>
          <xs:element name='shy' type='empty'/>
          <xs:element name='sick' type='empty'/>
          <xs:element name='sleepy' type='empty'/>
          <xs:element name='spontaneous' type='empty'/>
          <xs:element name='stressed' type='empty'/>
          <xs:element name='strong' type='empty'/>
          <xs:element name='surprised' type='empty'/>
          <xs:element name='thankful' type='empty'/>
          <xs:element name='thirsty' type='empty'/>
          <xs:element name='tired' type='empty'/>
          <xs:element name='undefined' type='empty'/>
          <xs:element name='weak' type='empty'/>
          <xs:element name='worried' type='empty'/>
        <xs:element name='text' minOccurs='0' type='xs:string'/>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>



Appendix A: Document Information

XMPP Standards Foundation
Standards Track
Last Updated
Approving Body
XMPP Council
XMPP Core, XEP-0163
Superseded By
Short Name
Source Control

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Ralph Meijer


This XMPP Extension Protocol is copyright © 1999 – 2024 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.

Disclaimer of Warranty

## 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. ##

Limitation of Liability

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.

IPR Conformance

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).

Visual Presentation

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.

Appendix D: Relation to XMPP

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.

Appendix E: Discussion Venue

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>.

Appendix F: Requirements Conformance

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".

Appendix G: Notes

1. XEP-0060: Publish-Subscribe <https://xmpp.org/extensions/xep-0060.html>.

2. XEP-0163: Personal Eventing Protocol <https://xmpp.org/extensions/xep-0163.html>.

3. Frijda, N. 1986. The Emotions. New York: Cambridge University Press.

4. Ortony, A., Clore, G., and Collins, A. 1988. The Cognitive Structure of Emotions. Hillsdale, NJ: Erlbaum.

5. Wierzbicka, A. 1992. Defining Emotion Concepts. Cognitive Science 16: 539-581.

6. Lisetti, C. 2002. Personality, Affect, and Emotion Taxonomy for Socially Intelligent Agents. In Proceedings of FLAIRS 2002. Menlo Park, CA: AAAI Press.

7. Wierzbicka, A. 1999. Emotions across Languages and Cultures. Cambridge: Cambridge University Press.

8. The Open Mobile Alliance is the focal point for the development of mobile service enabler specifications, which support the creation of interoperable end-to-end mobile services. For further information, see <http://www.openmobilealliance.org/>.

9. Leech, G., Rayson, P., and Wilson, A. 2001. Word Frequencies in Written and Spoken English. Harlow, England: Pearson Education.

10. The Wireless Village Initiative: Presence Attributes v1.1 (WV-029); for further information, visit <http://www.openmobilealliance.org/tech/affiliates/wv/wvindex.html>.

11. RFC 2277: IETF Policy on Character Sets and Languages <http://tools.ietf.org/html/rfc2277>.

12. 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/>.

13. 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/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 1.2.2 (2024-06-20)
    Fixed typo
    XEP Editor (dg)
  2. Version 1.2.1 (2018-03-13)

    Changed the namespace of an example of proprietary extensibility.

  3. Version 1.2 (2008-10-29)

    Allowed empty mood element to signify a pause in publishing; added undefined element to handle any unspecified mood; also added more moods: amorous, cautious, confident, contemplative, crazy, creative, dejected, dismayed, envious, hopeful, lucky, outraged, relaxed, spontaneous, strong, thankful, tired, weak.

  4. Version 1.1 (2007-06-04)

    Corrected PEP examples.

  5. Version 1.0 (2004-10-20)

    Per a vote of the Jabber Council, advanced status to Draft; per Council discussion, also added two additional moods and adjusted structure to use elements rather than XML character data.

  6. Version 0.6 (2004-09-15)

    Added internationalization considerations.

  7. Version 0.5 (2004-04-25)

    Corrected several errors; added reference to XEP-0033.

  8. Version 0.4 (2004-02-19)

    Minor fixes to text and schema.

  9. Version 0.3 (2003-08-01)

    Added more moods.

  10. Version 0.2 (2003-07-23)

    Expanded the information format; changed primary container to use pubsub.

  11. Version 0.1 (2003-07-22)

    Initial version.


Appendix I: Bib(La)TeX Entry

  title = {User Mood},
  author = {Saint-Andre, Peter and Meijer, Ralph},
  type = {XEP},
  number = {0107},
  version = {1.2.2},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0107.html},
  date = {2003-07-22/2024-06-20},