From 92bbd1fb3606e18589fa422e5e043a298dd306f1 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Mon, 24 Nov 2008 20:40:27 +0000 Subject: [PATCH] 1.3rc1: modified implicit discovery algorithm git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2523 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0085.xml | 83 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/xep-0085.xml b/xep-0085.xml index 8d4fb8e8..07aba488 100644 --- a/xep-0085.xml +++ b/xep-0085.xml @@ -19,7 +19,7 @@ XEP-0030 - XEP-0022 (in part) + XEP-0022 chatstates @@ -28,6 +28,12 @@ &stpeter; &dizzyd; + + 1.3rc1 + 2008-11-20 + psa +

.

+
1.2 2006-07-12 @@ -132,23 +138,23 @@ -

Many instant messaging systems include notifications about the state of one's conversation partner in a one-to-one chat (or, sometimes, in a many-to-many chat). Usually these are limited to notification that one's partner is currently typing -- e.g., the Composing event in XEP-0022 (see &xep0022;). However, a composing event is essentially information about a person's participation in or involvement with the chat "session" and therefore is really a session-level state rather than a per-message event -- e.g., the Delivered and Displayed events in XEP-0022. While the composing event is interesting, the concept of a session-level state can be extended to answer a variety of questions about the participation of a person in a real-time chat conversation, such as:

+

Many instant messaging systems include notifications about the state of one's conversation partner in a one-to-one chat (or, sometimes, in a many-to-many chat). Usually these are limited to notification that one's partner is currently typing -- e.g., the Composing event in the older (deprecated) &xep0022; protocol. However, a composing event is essentially information about a person's participation in or involvement with the chat "session" and therefore is really a session-level state rather than a per-message event (in contrast to the Delivered and Displayed events in XEP-0022). While the composing event is interesting, the concept of a session-level state can be extended to answer a variety of questions about the participation of a person in a real-time chat conversation, such as:

  • Has this person paused the composition?
  • Is this person actively paying attention to the chat?
  • Is this person temporarily inactive (i.e., not paying attention right now)?
  • Is this person simply gone (i.e., no longer participating in the chat)?
-

To answer such questions, this document supplements the traditional composing state by defining four additional chat states (paused, active, inactive, gone), for a total of five states that (it is hoped) together fully describe the possible states of a person's participation in or involvement with a chat conversation. These states do not necessarily refer to the state of the client interface and certainly not to the disposition of a particular message. However, the user's involvement with the system, device, chat interface, or input interface can provide important clues regarding the user's involvement with the chat session, which should be used by the client in determining when to generate chat state notifications.

+

To answer such questions, this document supplements the traditional composing state by defining four additional chat states (paused, active, inactive, gone), for a total of five states that (it is hoped) together fully describe the possible states of a person's participation in or involvement with a chat conversation. These states do not necessarily refer to the state of the client interface and certainly not to the disposition of a particular message. However, the user's involvement with the system, device, chat session interface, or input interface can provide important clues regarding the user's involvement with the chat session; these clues can be used by the client in determining when to generate chat state notifications.

In essence, chat state notifications can be thought of as a form of chat-specific presence. For example, consider what might happen if a user "loses" a chat window on his desktop; the user might still be interacting with his messaging client (thus never automatically changing his basic presence to "away"), but the user's state with regard to the chat session might change progressively from active to inactive to gone. This information would help the user's conversation partner understand why she has not received a response to her messages in the chat session.

Chat state notifications can appear in two kinds of &MESSAGE; stanzas:

    -
  • A "content message" -- that is, a message stanza that contains standard messaging content such as the <body/>, <subject/>, and <thread/> child elements defined in &xmppim; and/or any other properly-namespaced child element(s).
  • +
  • A "content message" -- that is, a message stanza whose primary meaning is contained in standard messaging content such as the XMPP <body/> or any other properly-namespaced child element(s) other than those defined for chat state notifications in this specification.
  • A "standalone notification" -- that is, a message stanza that does not contain standard messaging content but instead is intended to specify only the chat state since it contains only a child element qualified by the "http://jabber.org/protocol/chatstates" namespace (or possibly also the XMPP <thread/> element; see the Threads section below).
-

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

@@ -159,7 +165,7 @@ - + @@ -171,19 +177,19 @@ - + - + - +
State
<active/> User is actively participating in the chat session.User accepts an initial content message, sends a content message, gives focus to the chat interface, or is otherwise paying attention to the conversation.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/>
<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., 5 seconds). An implementation may also "guess" that composing has been paused based on a change in the user's interaction with the message input interface, e.g. if the user switches window or application focus.User was composing but has not interacted with the message input interface for a short period of time (e.g., 5 seconds). An implementation could also "guess" that composing has been paused based on a change in the user's interaction with the message input interface, e.g. if the user switches window or application focus. <active/>, <composing/>, <inactive/>
<inactive/> User has not been actively participating in the chat session.User has not interacted with the chat interface for an intermediate period of time (e.g., 30 seconds).User has not interacted with the chat session interface for an intermediate period of time (e.g., 30 seconds). <active/>, <paused/>, <gone/>
<gone/> User has effectively ended their participation in the chat session.User has not interacted with the chat interface, system, or device for a relatively long period of time (e.g., 2 minutes), or has terminated the chat interface (e.g., by closing the chat window).User has not interacted with the chat session interface, system, or device for a relatively long period of time (e.g., 2 minutes), or has terminated the chat session interface (e.g., by closing the chat window). <active/>
@@ -202,37 +208,36 @@ INACTIVE <--> ACTIVE <--> COMPOSING ]]>

Note: All four of the states shown can transition to the GONE state.

- +

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

+ type='get'> ]]> + type='result'> ]]> -

In addition, support for the Chat States Notification protocol can be determined through the dynamic profile of Service Discovery defined in &xep0115;.

+

In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.

-

Before generating chat state notifications, a User SHOULD explicitly discover whether the Contact supports the protocol defined herein (as described in the Discovering Support section of this document) or explicitly negotiate the use of chat state notifications with the Contact (via &xep0155;).

+

Before generating chat state notifications, a User SHOULD explicitly discover whether the Contact supports the protocol defined herein (as described in the Discovering Support section of this document) or explicitly negotiate the use of chat state notifications with the Contact (e.g., via &xep0155;).

In the absence of explicit discovery or negotiation, the User MAY implicitly request and discover the use of chat state notifications in a one-to-one chat session by adhering to the following business rules:

    -
  1. If the User desires chat state notifications, the initial content message sent to the Contact MUST contain a chat state notification extension, which SHOULD be <active/>.
  2. -
  3. Until receiving a reply to the initial content message (or a standalone notification) from the Contact, the User MUST NOT send subsequent chat state notifications to the Contact.
  4. -
  5. If the Contact replies to the initial content message but does not include a chat state notification extension, the User MUST NOT send subsequent chat state notifications to the Contact.
  6. -
  7. If the Contact replies to the initial content message and includes an <active/> notification (or sends a standalone notification to the User), the User and Contact SHOULD send subsequent notifications for supported chat states (as specified in the next subsection) by including an <active/> notification in each content message and sending standalone notifications for the chat states they support (at a minimum, the <composing/> state).
  8. +
  9. If the User desires chat state notifications, the message(s) that it sends to the Contact before receiving a reply MUST contain a chat state notification extension, which SHOULD be <active/>.
  10. +
  11. If the Contact replies but does not include a chat state notification extension, the User MUST NOT send subsequent chat state notifications to the Contact.
  12. +
  13. If the Contact replies and includes an <active/> notification (or sends a standalone notification to the User), the User and Contact SHOULD send subsequent notifications for supported chat states (as specified in the next subsection) by including an <active/> notification in each content message and sending standalone notifications for the chat states they support (at a minimum, the <composing/> state).

The foregoing rules imply that the sending of chat state notifications is bidirectional (i.e., both User and Contact will either send or not send chat state notifications) rather than unidirectional (i.e., one of the conversation partners will send chat state notifications but the other will not); this is by design.

@@ -263,7 +268,7 @@ INACTIVE <--> ACTIVE <--> COMPOSING SHOULD -

A client MUST allow the user to configure whether he or she wants to send chat state notifications.

+

A client MUST allow users to configure whether they want to send chat state notifications.

Note: Support for only <active/> and <composing/> is functionally equivalent to supporting the Composing event from XEP-0022.

@@ -274,7 +279,7 @@ INACTIVE <--> ACTIVE <--> COMPOSING
  • This protocol MUST NOT be used with stanzas other than &MESSAGE;.
  • This protocol SHOULD NOT be used with message types other than "chat" or "groupchat".
  • The 'type' attribute for content messages and standalone notifications SHOULD be set to a value of "chat" (for one-to-one sessions) or "groupchat" (for many-to-many sessions).
  • -
  • A chat session MAY span multiple user sessions (i.e., chat state is orthogonal to the availability and presence of one's conversation partner), although this is unlikely given the suggested timing of event triggers.
  • +
  • A chat session MAY span multiple user sessions (i.e., chat state is orthogonal to the presence of one's conversation partner), although this is unlikely given the suggested timing of event triggers.
  • @@ -284,17 +289,17 @@ INACTIVE <--> ACTIVE <--> COMPOSING
  • A client SHOULD NOT generate <gone/> notifications.
  • A client SHOULD ignore <gone/> notifications received from other room occupants.
  • -

    Note: Use of chat state notifications in the context of groupchat may result in multicasting of such notifications. Forewarned is forearmed.

    +

    Note: Use of chat state notifications in the context of groupchat can result in multicasting of such notifications. Forewarned is forearmed.

    1. A message stanza MUST NOT contain more than one child element qualified by the 'http://jabber.org/protocol/chatstates' namespace.
    2. -
    3. A message stanza that contains standard messaging content -- i.e., the <body/>, <subject/>, and <thread/> child elements defined in &xmppim; and/or any other properly-namespaced child element(s) -- SHOULD NOT contain a chat state notification extension other than <active/>.
    4. +
    5. A message stanza that contains standard instant messaging content SHOULD NOT contain a chat state notification extension other than <active/>, where "standard instant messaging content" is taken to mean the <body/>, <subject/>, and <thread/> child elements defined in &xmppim; or any other child element that would lead the recipient to treat the stanza as an instant message as explained in &xep0226;.
    6. A message stanza that does not contain standard messaging content and is intended to specify only the chat state MUST NOT contain any child elements other than the chat state notification extension, which SHOULD be a state other than <active/>; however, if threads are used (see below) then the standalone notification MUST also contain the <thread/> element.
    -

    While chat state notifications provide a mechanism for managing chat threads (i.e., the <thread/> element), support for threads is OPTIONAL. However, if all of the clients participating in a chat both support and use threads, the following additional business rules apply:

    +

    While chat state notifications provide a mechanism for managing chat threads as communicated by inclusion of the XMPP <thread/> element, support for threads is OPTIONAL (for further information about threads, refer to &xep0201;). However, if all of the clients participating in a chat both support and use threads, the following additional business rules apply:

    1. Clients MUST copy back Thread IDs (i.e., the value of the <thread/> element) in any replies.
    2. When a client terminates a one-to-one chat session (e.g., when a user closes the chat session interface), it MUST generate a <gone/> event.
    3. @@ -306,7 +311,7 @@ INACTIVE <--> ACTIVE <--> COMPOSING -

      In the following conversation, both User and Contact support chat state notifications.

      +

      In the following conversation, both User <bernardo@shakespeare.lit> and Contact <francisco@shakespeare.lit> support chat state notifications.

      ACTIVE <--> COMPOSING

      And so forth.

      -

      The following conversation flow illustrates in more detail the workings of chat state notifications (in this case also using threads).

      +

      The following conversation flow illustrates in more detail the workings of chat state notifications (in this case also using threads) between a User <romeo@shakespeare.lit> and a Contact <juliet@capulet.com>.

      ACTIVE <--> COMPOSING ]]> -

      At this point Juliet's client knows that Romeo's client supports chat state notifications. Thus she replies to the initial content message and her client includes a notification that her state is <active/>:

      +

      At this point Juliet's client knows that Romeo's client supports chat state notifications. Thus she replies to the content message and her client includes a notification that her state is <active/>:

      ACTIVE <--> COMPOSING ]]> -

      And so the conversation continues. After a while, Juliet asks a question that brings Romeo up short. Romeo begins composing a reply to Juliet's heartfelt question, and his Jabber client notifies Juliet that he is composing a reply.

      +

      And so the conversation continues. After a while, Juliet asks a question that brings Romeo up short:

      + + act2scene2chat1 + Art thou not Romeo, and a Montague? + + ]]> +

      Romeo begins composing a reply to Juliet's heartfelt question, and his client notifies Juliet that he is composing a reply.

      ACTIVE <--> COMPOSING ]]> -

      Romeo realizes his reply is too rash and pauses to choose the right words; after some (configurable) time period, his Jabber client senses the delay and sends a state of <paused/>.

      +

      Romeo realizes his reply is too rash and pauses to choose the right words; after some (configurable) time period, his client senses the delay and sends a state of <paused/>.

      ACTIVE <--> COMPOSING

      My, these star-crossed lovers do go on, don't they?

      -

      A client that receives a chat state notification should expect that it may never receive another message or chat state notification from the other entity (e.g., because the other entity crashes or goes offline) and should plan accordingly.

      +

      A client that receives a chat state notification might never receive another message or chat state notification from the other entity (e.g., because the other entity crashes or goes offline) and needs to plan accordingly.

      -

      The states of a chat thread may reveal information about a user's interaction with his or her computer, including his or her physical presence; such information SHOULD NOT be revealed to conversation partners who are not trusted to know such information. Client implementations MUST provide a mechanism that enables the user to disable chat state notifications if desired.

      +

      The states of a chat thread can reveal information about a user's interaction with his or her computer, including his or her physical presence; such information SHOULD NOT be revealed to conversation partners who are not trusted to know such information. Client implementations MUST provide a mechanism that enables the user to disable chat state notifications if desired.

      This document requires no interaction with &IANA;.