Clarified that any state change is allowed.
The five chat states specified in this document are described below. The suggested triggers and state changes are simply that: suggestions. It is up to the implementation to determine when to generate chat state notifications and which notifications to generate.
+The five chat states specified in this document are described below. The suggested triggers are simply that: suggestions. It is up to the implementation to determine when to generate chat state notifications and which notifications to generate.
State | Definition | Suggested Triggers | -Suggested State Changes | |
---|---|---|---|---|
<active/> | User is actively participating in the chat session. | -User accepts an initial content message, sends a content message, gives focus to the chat session interface, or is otherwise paying attention to the conversation. | -<inactive/>, <composing/> | -|
<composing/> | -User is composing a message. | -User is interacting with a message input interface specific to this chat session (e.g., by typing in the input area of a chat window). | -<active/>, <paused/> | -|
<paused/> | -User had been composing but now has stopped. | -User was composing but has not interacted with the message input interface for a short period of time (e.g., 30 seconds). |
- <active/>, <composing/>, <inactive/> | +User accepts an initial content message, sends a content message, gives focus to the chat session interface (perhaps after being inactive), or is otherwise paying attention to the conversation. |
<inactive/> | User has not been actively participating in the chat session. | User has not interacted with the chat session interface for an intermediate period of time (e.g., 2 minutes). | -<active/>, <paused/>, <gone/> | |
<gone/> | User has effectively ended their participation in the chat session. | User has not interacted with the chat session interface, system, or device for a relatively long period of time (e.g., 10 minutes). | -<active/> | +|
<composing/> | +User is composing a message. | +User is actively interacting with a message input interface specific to this chat session (e.g., by typing in the input area of a chat window). | +||
<paused/> | +User had been composing but now has stopped. | +User was composing but has not interacted with the message input interface for a short period of time (e.g., 30 seconds). |
Note that the <active/>, <inactive/>, and <gone/> states refer to the overall chat session interface whereas the <composing/> and <paused/> states refer to the message input interface (and are in some sense a subset of <active/>). Some implementations might support only events related to the message input interface, some implementations might support only events related to the overall chat session interface, and some implementations might support both kinds of events.
The following figure attempts to capture the possible state transitions in visual form.
+The following figure attempts to capture the most common state transitions in visual form (all four of the states shown can also transition to the GONE state).
ACTIVE <--> COMPOSING
- | ^ |
- | | |
- + <------ PAUSED <-----> +
+INACTIVE <--> ACTIVE <--> COMPOSING <--> PAUSED
+ | |
+ | |
+ +---<---<---<---<---<---<---<---<---<---+
]]>
- Note: All four of the states shown can transition to the GONE state.
+Note: Other transitions are not forbidden if the developers of an implementation feel that such transitions are desirable (e.g., INACTIVE to PAUSED if a user returns to a chat session interface containing an unfinished message).
If an entity supports the Chat State Notifications protocol, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning a feature of "http://jabber.org/protocol/chatstates":