Copyright (c) 1999 - 2009 XMPP Standards Foundation. See Legal Notices.
This specification defines recommended handling of the /me command in XMPP instant messaging clients.
NOTICE: This document is currently within Last Call or under consideration by the XMPP Council for advancement to the next stage in the XSF standards process.
1. Introduction
2. Recommended Handling
3. Integration With XHTML-IM
4. Accessibility Considerations
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
8. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Many Jabber/XMPP instant messaging clients provide special processing and presentation of the string "/me " at the beginning of a message body. This specification describes the recommended handling of this "command".
The /me command [1] is a text string that enables a human user to type an action phrase and have it be presented in a special way within an instant messaging client. The text string is followed by a verb or verb phrase, such as "/me laughs" or "/me is logging off now". This command does not result in the generation of any XMPP protocol. Instead, the command is sent as-is (e.g., <body>/me laughs</body>) and the receiving client performs string-matching on the first four characters of the data included in the <body/> element to determine if the message begins with the string "/me ". If the client finds a match, the receiving client will show the message with a special presentation. It is RECOMMENDED for the client to show the receiving client's understanding of the sender's user name, nickname, or handle [2] followed by the verb phrase in italicized text, prepended by the "*" character.
For example, imagine that the Greek god Atlas is in a chatroom with the other gods and types the following text in his IM client:
/me shrugs in disgust
That text will be sent to all the occupants in the chatroom as follows:
<message from='olympians@chat.gods.lit/Atlas' to='olympians@chat.gods.lit' type='groupchat'> <body>/me shrugs in disgust</body> </message>
Each recipient's client would then show the message with a special presentation, such as:
* Atlas shrugs in disgust
If the receiving client does not find a match on the string "/me " in the first four characters of the message body, it SHOULD NOT present the text in a special way. For example, the following message bodies do not match:
<body>/meshrugs in disgust</body> <body>/me's disgusted</body> <body> /me shrugs in disgust</body> <body>"/me shrugs in disgust"</body> <body>* Atlas shrugs in disgust</body> <body>Why did Atlas say "/me shrugs in disgust"?</body>
XHTML-IM [5] describes a method for lightweight formatting of a message body using a subset of XHTML. For example, the stanza shown above might be formatted in the color green, as follows.
<message from='olympians@chat.gods.lit/Atlas' to='olympians@chat.gods.lit' type='groupchat'> <body>/me shrugs in disgust</body> <html xmlns='http://jabber.org/protocol/xhtml-im'> <body xmlns='http://www.w3.org/1999/xhtml'> <p style='color:green'>/me shrugs in disgust</p> </body> </html> </message>
The XHTML-formatted version of the message MUST NOT modify the "/me " command string (e.g., in this case to something like "* Atlas shrugs in disgust") because the recipient might have a different user name, nickname, or handle on file for the sender.
This specification describes the /me command in terms of visual presentation. A receiving client that presents messages aurally MAY modify its presentation of /me commands and SHOULD at a minimum transform the string "/me " into the user name, nickname, or handle of the sender.
Multi-User Chat [6] rooms send XMPP presence stanzas when people leave and join the room, and receiving clients typically show these presence changes as the equivalent of in-room messages, such as the following transformation of a presence stanza of type unavailable:
*** Atlas has left the room
A sender could attempt to spoof such a leave message by sending an XMPP groupchat message stanza whose body text is "/me has left the room". Although the presentation of presence joins and leaves is determined by the receiving client and therefore such a notification cannot be universally spoofed for all receivers, a client SHOULD differentiate between presence notifications and /me commands (e.g., with different colors and different prepended characters, such as several asterisks for presence notifications and one asterisk for /me commands).
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].
This document requires no interaction with the XMPP Registrar [8].
Thanks to Dave Cridland, Kevin Smith, and Matthew Wild for their feedback and suggestions.
Series: XEP
Number: 0245
Publisher: XMPP Standards Foundation
Status:
Proposed
Type:
Historical
Version: 0.2
Last Updated: 2009-01-08
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
Source Control:
HTML
RSS
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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 <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata may 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. The string "/me " is usually pronounced "slash-me".
2. On the difference between user names, nicknames, and handles, see Best Practices to Prevent JID Mimicking [3] and User Nickname [4].
3. XEP-0165: Best Practices to Prevent JID Mimicking <http://xmpp.org/extensions/xep-0165.html>.
4. XEP-0172: User Nickname <http://xmpp.org/extensions/xep-0172.html>.
5. XEP-0071: XHTML-IM <http://xmpp.org/extensions/xep-0071.html>.
6. XEP-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
7. 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/>.
8. 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 <http://xmpp.org/registrar/>.
Clarified handling of XHTML-IM formatting; added security consideration for multi-user chat rooms.
(psa)Initial published version.
(psa)First draft.
(psa)END