From 31a6a455947bbf130a1b69f66f63c1faaf96b57b Mon Sep 17 00:00:00 2001 From: Ian Paterson Date: Thu, 2 Nov 2006 00:27:11 +0000 Subject: [PATCH] 0.11 RC1 removed reason field and clarified handling of required fields git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@159 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0155.xml | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/xep-0155.xml b/xep-0155.xml index 4cbe87d6..a9a6c01c 100644 --- a/xep-0155.xml +++ b/xep-0155.xml @@ -7,7 +7,7 @@
Chat Session Negotiation - This document specifies a feature negotiation profile for initiating a one-to-one XMPP chat session. + This document specifies a feature negotiation profile for initiating a one-to-one chat session. &LEGALNOTICE; 0155 Experimental @@ -25,6 +25,12 @@ chatneg &stpeter; &ianpaterson; + + 0.11 + 2006-11-02 + ip +

Removed reason field; clarified handling of required fields

+
0.10 2006-10-31 @@ -130,6 +136,7 @@ + c2s +

The user MAY request a session with a specific resource of the contact. However, if the user specifies no resource (or if the specified resource is not available), then the contact's server delivers the request to the contact's most available resource (which in the examples below happens to be "balcony"). If no resource is available (and no Advanced Message Processing rule included in the request specifies otherwise) then the server MAY store the request for later delivery. In this case, if the contact is interested only in an immediate chat session when it eventually receives the request, it SHOULD initiate a new chat session negotiation (including a newly-generated ThreadID) instead of responding to the user's request. Note: Sending any response to the user's original request would leak presence information since it would divulge the fact that the contact had been offline rather than just ignoring the user.

In any response to the user's request, the contact's client MUST mirror the &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.

If the contact's client is configured to show the form to the client instead of responding automatically it SHOULD replace the content of the <title/> element and of all label attributes of the <field/> and <option/> elements with it's own localised versions before showing the form to the client - even if the form already appears to be in the correct language. Note: If a client fails to localise the form then an malicious contact might, for examples, either switch the labels on the 'security' and 'otr' fields, or use the <title/> to mislead the user regarding the identity of the contact.

+

If the request is accepted then the client MUST include in its response values for all the fields that the request indicated are required. 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:

Note: Both entities MUST assume the session has been established with the resource of the contact that sends the reply, even if the user sent its request to a different resource of the contact.

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:

+

However, if the contact simply prefers not to chat then the client SHOULD decline the invitation. The data form MUST contain the FORM_TYPE field and the "accept" field set to "0" or "false". It is RECOMMENDED that the form does not contain any other fields even if the request indicated they are required. The client MAY include a reason in the &BODY; child of the &MESSAGE; stanza:

http://jabber.org/protocol/chatneg
0 - - Sorry, can't chat now! How about tonight? - + Sorry, can't chat now! How about tonight? ]]>

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:

@@ -316,9 +322,7 @@ - - - Lets keep this private! + @@ -378,8 +382,8 @@

Once the other party has accepted the switch then all stanzas sent within the chat session MUST be to or from the new resource. Note: Both parties MUST ensure that they comply with all the other chat session negotiation parameters that were previously agreed for this session.

-

In order to explicitly terminate a negotiated chat, the party that wishes to end the chat MUST do so by sending a &MESSAGE; containing a data form of type "submit". The &MESSAGE; stanza MUST contain a &THREAD; element with the same XML character data as the original initiation request. The data form containing a boolean field named "terminate" set to a value of "1" or "true" and MAY also contain a "reason" field.

- In order to explicitly terminate a negotiated chat, the party that wishes to end the chat MUST do so by sending a &MESSAGE; containing a data form of type "submit". The &MESSAGE; stanza MUST contain a &THREAD; element with the same XML character data as the original initiation request. The data form containing a boolean field named "terminate" set to a value of "1" or "true".

+ @@ -390,13 +394,12 @@ http://jabber.org/protocol/chatneg 1 - Gotta go! ]]>

Both parties MUST then consider the chat session to be ended.

-

The other party's client MAY explicitly acknowledge the termination of the chat by sending a &MESSAGE; containing a data form of type "result", with no "reason" field and the value of the "terminate" field set to "1" or "true". The client MUST mirror the &THREAD; value it received.

+

The other party's client MAY explicitly acknowledge the termination of the chat by sending a &MESSAGE; containing a data form of type "result", and the value of the "terminate" field set to "1" or "true". The client MUST mirror the &THREAD; value it received.

+ label='Primary written language of the chat (each value appears in order of preference and conforms to RFC 4646 and the IANA registry)'/> false - -