From 20dea8e1fcd0d2d00ba456b62000fd2168705aa5 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Wed, 10 Mar 2010 04:30:54 +0000 Subject: [PATCH] 1.2rc1: applied patch from Alexander and Yann git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4061 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0136.xml | 116 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 13 deletions(-) diff --git a/xep-0136.xml b/xep-0136.xml index 8018fbc1..f04ad1e5 100644 --- a/xep-0136.xml +++ b/xep-0136.xml @@ -40,6 +40,17 @@ Tsvyashchenko lists@ndl.kiev.ua + + Yann + Leboulanger + asterix@lagaule.org + + + 1.2rc1 + in progress, last updated 2010-01-06 + at/yl +

Added persistent auto save setting; added ability to control settings per chat session.

+
1.1 2009-09-23 @@ -183,6 +194,7 @@
  • A client determines its user's current default Save Mode and OTR Mode, and the Modes for particular contacts.
  • A client sets the default Save Mode and OTR Mode.
  • A client sets the Save Mode and OTR Mode for a particular contact.
  • +
  • A client sets the Save Mode for a particular chat session.
  • @@ -192,6 +204,7 @@
  • MUST include an <auto/> element that specifies whether automatic archiving is on or off.
  • MUST include a <default/> element that specifies the user's default settings for OTR Mode and Save Mode.
  • MAY include one or more <item/> elements that specify preferences related to particular contacts.
  • +
  • MAY include one or more <session/> elements that specifies whether automatic archiving is on or off for a given chat session.
  • MUST include at least three <method/> elements, differentiated by the value of the 'type' attribute (i.e., at least one <method/> element each for "auto", "local", and "manual").
  • An example follows.

    @@ -202,6 +215,7 @@ + @@ -210,7 +224,12 @@ ]]>

    The <auto/> element specifies the current Automatic Archiving settings for this stream.

    -

    This element MUST be empty and MUST include a boolean 'save' attribute &BOOLEANNOTE; that specifies whether automatic archiving is enabled or disabled for this stream.

    +

    This element MUST be empty and MUST include a boolean 'save' attribute &BOOLEANNOTE; that specifies whether automatic archiving is enabled or disabled for this stream. The element MAY include a 'scope' attribute that specifies how long this setting is true. The allowable values are:

    +
      +
    • global -- the setting will remain for next streams.
    • +
    • stream -- the setting is true only until the end of the stream. For next stream, server default value will be used.
    • +
    +

    Note: If 'scope' attribute is not set, it SHOULD be considered as 'stream'.

    The <default/> element specifies the default settings for both OTR Mode and Save Mode. The element MUST be empty and MUST include an 'otr' attribute and a 'save' attribute. The element MAY include an 'expire' attribute.

    @@ -273,6 +292,28 @@

    * Note: The upload, retrieval and management of 'stream' archives is currently beyond the scope of this document.

    + +

    The <session/> element specifies the settings for Save Mode with regard to a particular chat session. The element MUST be empty and MUST include a 'thread' attribute, and a 'save' attribute. The element MAY include a 'timeout' attribute.

    +

    Server implementations SHOULD remove all <session/> elements when stream is closed.

    + +

    The 'timeout' attribute indicates how long this rule will stay in server after the latest message in this thread is exchanged. Server MUST NOT forget this rule before 'timeout' seconds after latest message in this thread is exchanged but MAY keep this rule longer than 'timeout' value specifies.

    +

    Client MUST NOT set this attribute, but wait for server's answer to know this value.

    +

    If the client wants to keep this rule longer, it must send a new <session/> element to the server before this timeout expires.

    +
    + +

    The 'thread' attribute specifies the ThreadID of the chat session (in the sense of &xep-0155;) to which the preferences specified in this <session/> element apply.

    +
    + +

    The 'save' attribute specifies the user's setting for Save Mode with regard to the specified chat session. The allowable values are:

    +
      +
    • body -- the saving entity SHOULD save only &BODY; elements.
    • +
    • false -- the saving entity MUST save nothing.
    • +
    • message -- the saving entity SHOULD save the full XML content of each &MESSAGE; element.
    • +
    • stream -- the saving entity SHOULD save every byte that passes over the stream in either direction. *
    • +
    +

    * Note: The upload, retrieval and management of 'stream' archives is currently beyond the scope of this document.

    +
    +

    Each <method/> element specifies the the user's preferences for one available archiving method. The <method/> element MUST be empty and MUST include both the 'type' and 'use' attributes.

    @@ -308,6 +349,7 @@ + @@ -319,6 +361,7 @@
  • By default, message bodies should be saved (according the preferred method specified later), communications may be off the record if requested, and any saved messages should be expired after 1 year.
  • When communicating with romeo@montague.net, both entities must not save messages and all communications must be off the record.
  • When communicating with benvolio@montague.net, both entities should save full messages, communications must not be off the record, and any saved messages should be expired after 20 years.
  • +
  • Message bodies in thread ffd7076498744578d10edabfe7f4a866 should be saved.
  • Server-side archiving must not occur automatically.
  • Local archiving may be used if requested.
  • Manual server-side archiving is preferred.
  • @@ -405,10 +448,48 @@ ]]>
    + +

    A client may use a similar protocol to set the Modes for a particular chat session. A chat session is identified by its unique 'thread' attributes in <message> stanza (see &xep0155;)

    + + + + + + ]]> + + ]]> + + + + + + + + + + + + ]]> +

    The same error cases apply as when Setting Default Modes.

    +

    In order to remove a preference for a chat session, the client shall send an <sessionremove/> element to the server.

    + + + + + + ]]> + + ]]> +

    The client can set one or more method preferences by sending an IQ-set containing a <pref/> element that in turn contains one or more <method/> elements.

    + @@ -417,11 +498,11 @@ ]]> + ]]>

    If the client includes less than three <method/> elements, the server MUST NOT modify the unspecified methods and MUST leave them as currently stored on the server. However, when the server pushes the method preferences it MUST include all of the preferences, not only those that were set by the client.

    + @@ -429,7 +510,7 @@ - + @@ -442,8 +523,16 @@

    Most archiving preferences are designed for interpretation only by the client. The server MUST NOT take into account any of the archiving preferences when server administration policies require that every message is to be logged automatically. Otherwise, the server MUST interpret the following archiving preferences (and SHOULD NOT interpret any other ones):

    1. The <auto/> element.
    2. -
    3. When performing automatic archiving: the 'save' attribute of the <default> element, and the 'jid' and 'save' attributes of the <item> element.
    4. +
    5. When performing automatic archiving: the 'save' attribute of the <default> element, the 'jid' and 'save' attributes of the <item> element, and the 'thread' and 'save' attributes of the <session> element. See Preferences precedence rules for details.
    6. When performing expiration of old messages: the 'jid' and 'expire' attributes of the <item> element.
    7. +
    8. When performing expiration of old rules: the 'thread' and 'timeout' attributes of the <session> element.
    9. +
    +
    + +

    When determining archiving preferences for a given message, the following rules shall apply:

    +
      +
    1. 'save' value is taken from the <session> element that matches the conversation, if present, else from the <item> element that matches the contact (see JID Matching), if present, else from default element.
    2. +
    3. 'otr' and 'expire' value are taken from the <item> element that matches the contact (see JID Matching), if present, else from default element.
    @@ -551,6 +640,7 @@

    If a user's OTR preference for a contact changes during a Chat Session that has been negotiated with the contact, and if the new preference would affect the value of the 'logging' field that was previously negotiated, then the client MUST immediately renegotiate the 'logging' field according to the user's new OTR preference (or terminate the Chat Session).

    +

    If a Stanza Session Negotiation result differ from current preferences of archiving for the contact (negotiation agreed to enable OTR and current 'save' value for this contact is not 'false', or negotiation agreed to disable OTR and current 'save' value for this contact is 'false'), the client MUST send a new <session/> element with the corresponding 'thread' attribute to the server to inform it to save or not the session.

    If a Stanza Session Negotiation agreed to enable OTR then the clients MUST NOT allow messages sent in either direction to be archived in any way (including Manual Archiving and Automatic Archiving). If a client (or user) acts in bad faith then its contacts cannot prevent it from archiving conversations.

    If a Stanza Session Negotiation agreed to enable OTR then both clients MUST ensure that the Stanza Session Negotiation messages themselves are not archived. For example, if Automatic Archiving was enabled when the client received the initial Stanza Session Negotiation request, then the client MUST immediately ask its server to delete its copy of the request (see Removing a Collection for a description of how to remove the messages currently being recorded by the server).

    @@ -787,7 +877,7 @@ ]]>

    Otherwise: