diff --git a/xep-0155.xml b/xep-0155.xml index 8bd25a04..11209cac 100644 --- a/xep-0155.xml +++ b/xep-0155.xml @@ -25,6 +25,12 @@ chatneg &stpeter; &ianpaterson; + + 0.9 + 2006-10-05 + ip +

Added language field; replaced secure field with security field; changed otr field to list-single; several clarifications.

+
0.8 2006-10-02 @@ -92,8 +98,8 @@ -

In order to initiate a negotiated chat session, the initiating party ("user") sends a &MESSAGE; stanza to the receiving party ("contact") containing a <feature/> child qualified by the 'http://jabber.org/protocol/feature-neg' namespace. The &MESSAGE; stanza MUST NOT contain a &BODY; child element (as specified in &rfc3921;). The &MESSAGE; stanza is used because the user does not necessarily know which of the contact's resources is most available (or indeed if the contact is online). The &MESSAGE; stanza type SHOULD be "normal" (either explicitly or by non-inclusion of the 'type' attribute). The stanza SHOULD include an 'id' attribute and MUST contain a &THREAD; element for tracking purposes (where the newly-generated ThreadID is unique to the proposed session). The data form MUST contain a hidden FORM_TYPE field whose value is "http://jabber.org/protocol/chatneg" and MUST contain a boolean field named "accept". &BOOLEANNOTE;

-

The following is an example of a negotiation request:

+

In order to initiate a negotiated chat session, the initiating party ("user") sends a &MESSAGE; The &MESSAGE; stanza is used because the user does not necessarily know which of the contact's resources is most available (or indeed if the contact is online). stanza to the receiving party ("contact") containing a <feature/> child qualified by the 'http://jabber.org/protocol/feature-neg' namespace. The &MESSAGE; stanza MUST NOT contain a &BODY; child element (as specified in &rfc3921;). The &MESSAGE; stanza type SHOULD be "normal" (either explicitly or by non-inclusion of the 'type' attribute). The stanza MAY include an 'id' attribute and MUST contain a &THREAD; element for tracking purposes (where the newly-generated ThreadID is unique to the proposed session). The data form MUST contain a hidden FORM_TYPE field whose value is "http://jabber.org/protocol/chatneg" and MUST contain a boolean field named "accept". &BOOLEANNOTE; The inclusion of "otr" and "security" fields is also RECOMMENDED. Note: The options within any 'list-single' fields SHOULD appear in order of preference.

+

In the following example of a negotiation request, Romeo requests a chat with Juliet and also queries her regarding whether she wants to enable all message logging (see &xep0136;) A client MUST NOT set the 'otr' field to 'true' unless it has confirmed that its server will allow it to switch off Automated Archiving (see Message Archiving). and support the &xep0071; and &xep0085; extensions during this chat session. He also requires that they are both connected securely to their servers, and asks which language she prefers amoungst those he can write. (Note: These fields are examples only; a full set of chat session negotiation parameters will be registered as described in the XMPP Registrar Considerations section of this document.)

true + + + + false + + - 0 + 1 - 0 - - 1 - - 1 + + c2s + + + + en + + ]]> -

In the foregoing example, Romeo requests a chat with Juliet and also queries her regarding whether she wants to disable all message logging (see &xep0136;) A client MUST NOT set the 'otr' field to 'true' unless it has confirmed that its server will allow it to switch off Automated Archiving (see Message Archiving). and support &xep0071; and &xep0085; extensions during this chat session. (Note: These fields are examples only; a full set of chat session negotiation parameters will be registered as described in the XMPP Registrar Considerations section of this document.)

-

Juliet's server delivers Romeo's request to her most available resource (which happens to be "balcony").

-

In any response to the request, the contact's client MUST mirror the 'id' attribute and &THREAD;value so that the user's client can correctly track the response.

-

We assume that Juliet accepts the chat and specifies that she does not want to log messages or use XHTML formatting but that she does want to use Chat State Notifications:

+

The contact's server delivers the request to the contact's most available resource (which in the examples below happens to be "balcony").

+

In any response to the request, the contact's client MUST mirror any 'id' attribute and &THREAD; value so that the user's client can correctly track the response.

+

If the contact's client does not support one of the default values or if the contact has disabled its support (as for Chat State Notifications and XHTML formatting in the example below), and the client can still accept the request, then it MUST set that field to a value that it can support.

+

In the example below we assume that Juliet accepts the chat and specifies that she prefers to speak Italian with Romeo:

true + + false + 0 - 1 + 0 - - 1 + + c2s - - 1 + + it - Sure, let's talk! + OK, but I'm too tired to practice my English! ]]> -

However, it could be that Juliet is busy so she declines the invitation.

+

If the contact does not want to reveal presence to the user for whatever reason then the contact's client SHOULD return no response or error (see Security Considerations). Also, if the contact is using a legacy client then it MAY not support returning any response or error. In both these cases the user MAY, proceed to send stanzas to the contact outside the context of a negotiated chat session.

+

However, if the contact simply prefers not to chat then the client SHOULD decline the invitation:

]]> -

If Juliet's client does not support feature negotiation or does not support the "http://jabber.org/protocol/chatneg" FORM_TYPE, it SHOULD return a &unavailable; error. However, if Juliet does not want to reveal her presence to Romeo for whatever reason, or she is using a legacy client that does not support returning a &unavailable; error, then her client MAY return no error. In this case Romeo MAY, proceed to send stanzas to Juliet outside the context of a negotiated chat session.

+

If the contact's client does not support feature negotiation or does not support the "http://jabber.org/protocol/chatneg" FORM_TYPE, it SHOULD return a &unavailable; error:

ffd7076498744578d10edabfe7f4a866 - - - - http://jabber.org/protocol/chatneg - - - 1 - - - 0 - - - 0 - - - 1 - - - 1 - - - Can we talk? - - - ]]> -

If Juliet's client does not support one of the required features, it SHOULD return a &feature; error (but MAY return no error if, for example, Juliet does not want to reveal her presence to Romeo for whatever reason):

+

If the contact's client does not support one or more of the required features, it SHOULD return a &feature; error and SHOULD specify the field(s) not implemented in a comma-separated list in the XMPP <text/> element:

ffd7076498744578d10edabfe7f4a866 - - - - http://jabber.org/protocol/chatneg - - - 1 - - - 0 - - - 0 - - - 1 - - - 1 - - - Can we talk? - - - + otr + + + ]]> +

If the contact's client supports none of the options for one or more fields, it SHOULD return a ¬acceptable; error and SHOULD specify the field(s) with unsupported options in a comma-separated list in the XMPP <text/> element:

+ + ffd7076498744578d10edabfe7f4a866 + + + security ]]> -

If Juliet's client does not support one of the optional features (e.g., Chat State Notifications) but it accepts the request, it MUST set the value of that boolean variable to "0" or "false".

At any time during an existing chat session, either party MAY attempt to renegotiate the parameters of the session. The requesting party does this by sending a new &MESSAGE; stanza containing a feature negotiation form and a &THREAD; element with the same value as that of the existing chat session.

@@ -312,30 +282,18 @@ http://jabber.org/protocol/chatneg - - 1 - - - 1 - - - 1 - - - 1 + true + - Gotta have formatting! + Lets keep this private! @@ -352,26 +310,17 @@ http://jabber.org/protocol/chatneg - + true - - 1 - - - 1 - - - 1 - - Agreed, XHTML is fun. + Yes, the sys admin might tell our families! ]]> -

If the other party's client does not support one of the required features, it SHOULD return a &feature; error instead. In that case the existing negotiated chat session parameters are maintained. Either party MAY then terminate the chat session as specified in the section Terminating a Chat.

+

If the other party's client does not support one or more of the required features, it SHOULD return a &feature; error instead, while if it supports none of the options for one or more fields, it SHOULD return a ¬acceptable; error instead (see Initiating a Chat). In either of these cases the existing negotiated chat session parameters are maintained. Either party MAY then terminate the chat session as specified in the section Terminating a Chat.

Either party MAY use chat renegotiation to attempt to continue the session using another of its resources. The requesting party does this by sending a feature renegotiation form with a "continue" field containing the value of the new resource:

@@ -379,7 +328,7 @@ + id='reneg2'> ffd7076498744578d10edabfe7f4a866 @@ -406,7 +355,7 @@ + id='reneg2'> ffd7076498744578d10edabfe7f4a866 @@ -516,6 +465,10 @@ However, if the receiving party assumes that the other client will not var='accept' type='boolean' label='Whether to accept the invitation'/> + not var='http://jabber.org/protocol/xhtml-im' type='boolean' label='Whether to enable XHTML-IM formatting per XEP-0071'/> + + type='list-single' + label='Off-The-Record'> + + + - + var='security' + type='list-single' + label='Minimum security level'> + + + + + +