diff --git a/xep-0280.xml b/xep-0280.xml index eae1a3a4..d86d3035 100644 --- a/xep-0280.xml +++ b/xep-0280.xml @@ -45,6 +45,19 @@ linuxwolf@outer-planes.net linuxwolf@outer-planes.net + + 0.13.0 + 2019-04-24 + gl + +

Create more explicit and more binding copying rules under the "urn:xmpp:carbons:rules:0" namespace:

+ +
+
0.12.1 2019-03-14 @@ -197,6 +210,7 @@ ... + ... ]]> @@ -278,18 +292,34 @@

The focus of this specification is instant messaging applications and so those (and only those) &MESSAGE; stanzas used for instant messaging SHOULD be delivered as Carbons.

-

Defining precisely which messages are used for instant messaging and which are not is difficult, as future specifications may add additional payloads used for, or not used for, instant messaging; as such, the rules for which messages are eligible for carbons delivery is left as an implementation detail for servers.

-

The following is a suggested set of rules a server MAY use, or it MAY use its own; in either case it SHOULD follow the general intent of these rules:

+

The following is the set of rules that a server implementation SHOULD use to determine which messages should be carbon-copied. Future specifications MAY add or override rules, though they are generally advised to use the <private/> element.

+ +

A &MESSAGE; is eligible for carbons delivery if it does not contain a <private/> child element and if at least one the following is true:

    -
  • A &MESSAGE; is eligible for carbons delivery if it is of type "chat".
  • -
  • A &MESSAGE; is eligible for carbons delivery if it is of type "normal" and it contains a <body> element.
  • -
  • A &MESSAGE; is eligible for carbons delivery if it is of type "error" and sent in response to a &MESSAGE; that was itself eligible for carbons delivery (Note that as this would require message tracking and correlation on the server, it is unlikely to be generally appropriate for most implementations).
  • -
  • A &MESSAGE; is not eligible for carbons delivery if it is determined to have been sent by a MUC room or service, even if it would be otherwise eligible (this also includes private messages from MUC participants).
  • -
  • A &MESSAGE; is not eligible for carbons delivery if it does not meet any of these criteria.
  • +
  • it is of type "chat".
  • +
  • it is of type "normal" and contains a <body> element.
  • +
  • it contains payload elements typically used in IM (&xep0184;, &xep0085;).
  • +
  • it is of type "error" and it was sent in response to a &MESSAGE; that was eligible for carbons delivery (Note that as this would require message tracking and correlation on the server, it is unlikely to be generally appropriate for most implementations).
  • +
  • it matches the MUC-related rules outlined below.
-

As this is a implementation detail of servers, clients MUST NOT rely on the server implementing a particular set of rules for which messages are eligible for Carbons delivery.

+

To properly handle messages exchanged with a MUC (or similar service), the server must be able to identify MUC-related messages. This can be accomplished by tracking the clients' presence in MUCs, or by checking for the <x xmlns="http://jabber.org/protocol/muc#user"> element in messages. The following rules apply to MUC-related messages: +

+
    +
  • A &MESSAGE; of type "groupchat" SHOULD NOT be carbon-copied.
  • +
  • A &MESSAGE; containing a &xep0249; SHOULD be carbon-copied.
  • +
  • A &MESSAGE; containing a Mediated Invitation SHOULD be carbon-copied.
  • +
  • A private &MESSAGE; from a local user to a MUC participant (sent to a full JID) SHOULD be carbon-copiedThe server SHOULD limit carbon-copying to the clients sharing a Multi-Session Nick in that MUC, and MAY inject the <x/> element into such carbon copies. Clients can not respond to carbon-copies of MUC-PMs related to a MUC they are not joined to. Therefore, they SHOULD either ignore such carbon copies, or provide a way for the user to join the MUC before answering..
  • +
  • A private &MESSAGE; from a MUC participant (received from a full JID) to a local user SHOULD NOT be carbon-copied (these messages are already replicated by the MUC service to all joined client instances).
  • +
+

As the above is an implementation detail of servers, clients MUST NOT rely on the server implementing a particular set of rules for which messages are eligible for Carbons delivery.

Future specifications may have more precise requirements on which messages need to be eligible for carbons delivery; such future specifications will provide their own discovery and negotiation mechanisms, such that a client negotiating Carbons using the protocol defined in this specification will cause the server to consider messages eligible for Carbons delivery based on the requirements described herein.

Note: previous versions of this specification limited eligible messages to those of type "chat" - however, this was generally found to be inadequate due to the proliferation of type "normal" messages used in instant messaging.

+
+ +

A server implementation can choose to advertise full support of all the rules in ยง6.1 by including the "urn:xmpp:carbons:rules:0" feature in its service discovery information. If that feature is advertised, the rules above must be treated as REQUIRED and not merely as RECOMMENDED.

+

Accordingly, if this feature is advertised, a client MAY rely on the server supporting this exact set of rules.

+

While future versions of this specification (or other specifications) might use a different set of delivery rules, they would signify this by advertising a namespace other than "urn:xmpp:carbons:rules:0".

+