Indication of Message Composition for Instant Messaging
Extracted elements (23)
Delivering status messages within the session-mode messaging stream provides three benefits: proper ordering/synchronization with content messages, ability to apply end-to-end security, and use of session negotiation mechanisms to enable/disable per direction.
Presence events and extensions (e.g., PIDF) were considered but rejected because they require explicit periodic subscriptions (more overhead) and are harder to target for page-mode delivery. An in-band message-based mechanism is also easier to translate across heterogeneous IM systems.
The isComposing status message MAY be carried in CPIM messages (RFC 3862), which is particularly useful when messages are relayed by a conference server to maintain the identity of the original composer.
The status message can be used with both page mode and session mode IM. In session mode it is part of the messaging stream; in page mode it is carried as the body of a page mode message. Session mode ensures proper ordering and synchronization with content messages.
Additional extension elements MUST use their own namespaces and MUST be designed so that receivers can safely ignore them. Adding elements to the namespace defined in this document is not permitted.
An isComposing XML document MUST be well formed and SHOULD be valid, MUST be based on XML 1.0, and MUST be encoded using UTF-8.
In SIP-based page mode IM, the composer MUST cease transmitting status messages if the receiver returned a 415 (Unsupported Media Type) status code in response to a MESSAGE request containing the status indication.
It is RECOMMENDED that isComposing indications in page mode are only sent when a message is being composed as a reply to an earlier message, to avoid privacy issues when no conversation has been established.
Receivers MUST be able to handle multiple consecutive isComposing messages with 'active' state, regardless of the refresh interval.
Recipients MUST treat state tokens other than 'idle' and 'active' as 'idle'. This ensures forward compatibility with future extensions to the state vocabulary.
The active-state refresh interval SHOULD be no shorter than 60 seconds. The composer MAY omit the refresh interval entirely, which causes the receiver to assume idle after 120 seconds.
Unless otherwise configured, the idle timeout SHOULD have a default value of 15 seconds. If the user stops composing for longer than this, the state transitions to 'idle' and an 'idle' status message is sent.
There are privacy issues in sending isComposing status before a conversation is established, since a status message may reveal that the user considered composing a message even if they later abandon it. Page-mode indications are RECOMMENDED only in reply to earlier messages.
The <contenttype> element indicates the MIME media type of the message being composed (e.g., 'text/plain', 'audio'). It is a hint to the recipient about the likely message format, not a guarantee of the actual content.
The isComposing status message consists of an <isComposing> root element with a mandatory <state> child ('idle' or 'active'), plus optional elements: <lastactive> (dateTime of last activity), <contenttype> (MIME type of message being composed), and <refresh> (positive integer seconds until next expected update).
The <refresh> element carries the active-state refresh interval in integer seconds, telling the receiver when to expect the next status update. If omitted, the receiver assumes the sender has gone idle after 120 seconds.
Registers a new XML schema with URI 'urn:ietf:params:xml:schema:im-composing' per BCP 81 (RFC 3688). The schema content is defined in Section 6.1 of RFC 3994.
Registers the MIME media type 'application/im-iscomposing+xml' with IANA for carrying isComposing XML documents. Optional parameter: charset (default UTF-8). Intended usage: LIMITED USE.
Registers the URN sub-namespace 'urn:ietf:params:xml:ns:im-iscomposing' in the IETF XML registry for XML elements defined by RFC 3994 to describe composition activity.
The isComposing indication provides a fine-grained view of user activity and requires careful confidentiality protection so that only the intended recipient receives it. All security considerations of the underlying IM protocol apply to isComposing status messages.
The message composer operates in two states: 'idle' (default) and 'active'. Transitions occur on composing start (idle→active, sends 'active' status), idle timeout without activity (active→idle, sends 'idle' status), content message sent (active→idle, no 'idle' message needed), and refresh timeout (active→active, sends 'active' refresh).
The status message receiver tracks sender state as 'idle' or 'active'. Transitions from active to idle occur when: (1) an 'idle' status message is received, (2) a content message is received, or (3) the refresh interval (or default 120 seconds) expires.
The isComposing document uses the XML schema at namespace 'urn:ietf:params:xml:ns:im-iscomposing'. The <state> element is xs:string (required); <lastactive> is xs:dateTime (optional); <contenttype> is xs:string (optional); <refresh> is xs:positiveInteger in seconds (optional). Extension elements from other namespaces are allowed with lax processing.