From f9ba69445ed3ecc8949661c4354377cd466922ed Mon Sep 17 00:00:00 2001 From: Wojciech Kapcia Date: Thu, 25 Mar 2021 16:21:40 +0100 Subject: [PATCH 1/4] Relegate message retraction to xep-0424 instead of using custom one. --- xep-0407.xml | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/xep-0407.xml b/xep-0407.xml index 4ed18a1b9..11de90c90 100644 --- a/xep-0407.xml +++ b/xep-0407.xml @@ -30,6 +30,7 @@ XEP-0313 XEP-0369 XEP-0372 + XEP-0424 @@ -172,22 +173,8 @@

- A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. A MIX channel MAY limit the time frame in which a message is allowed to be retracted, for example to prevent retraction of very old messages. When a messages is retracted the original message MAY be replaced by a tombstone. Message retraction is done by sending a special message that identifies the original message. This mechanism allows the retraction to be distributed on the same path as the original message so that all participating servers and clients MAY honour the retraction. The protocol to request retraction does this by adding to a message a <retract> element qualified by the 'urn:xmpp:mix:misc:0' namespace. A retract messages MUST NOT have a body. The <retract> element MUST include an 'id' attribute that holds the MAM-ID of the original message. The message sender will need to look up the MAM-ID. The MAM-ID is the convenient message identification for message recipients. A message and its retraction shown in the following example. + A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. A MIX channel MAY limit the time frame in which a message is allowed to be retracted, for example to prevent retraction of very old messages. When a messages is retracted the original message MAY be replaced by a tombstone. Message retraction is done by means defined in &xep0424;.

- - A Message I did not mean to send - - - - - -]]>

The MIX channel will allow a user to retract a message sent by the user if the 'Allow User Message Retraction' option is configured. The MIX channel will allow an administrative user to retract any message if the user is in the group specified by the 'Administrator Message Retraction Rights' option.

@@ -198,23 +185,8 @@ Two approaches to message retraction can be used. In the first approach, the retracted message is simply removed. This is appropriate where retraction is provided as a user service and the user has rights to remove messages sent from the record.

- The second approach is to leave a tombstone, which if taken MUST be done in the following manner. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted. - With this approach, the original message <body> is removed and replaced with a tombstone using the <retracted> element qualified by the 'urn:xmpp:mix:misc:0' namespace that shows the JID of user performing the retraction and the time of the retraction. + The second approach is to leave a tombstone. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted.

- - - - - - - - - - -]]>
From 63c963b9c15700a3191d4be8f0a176194f3235a9 Mon Sep 17 00:00:00 2001 From: Wojciech Kapcia Date: Fri, 14 May 2021 18:42:29 +0200 Subject: [PATCH 2/4] Clarify retraction and 424 usage: stanza-id in retraction payload, tombstones, add examples --- xep-0407.xml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/xep-0407.xml b/xep-0407.xml index 11de90c90..abcecbb17 100644 --- a/xep-0407.xml +++ b/xep-0407.xml @@ -28,6 +28,7 @@ XEP-0292 XEP-0297 XEP-0313 + XEP-0359 XEP-0369 XEP-0372 XEP-0424 @@ -173,8 +174,26 @@

- A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. A MIX channel MAY limit the time frame in which a message is allowed to be retracted, for example to prevent retraction of very old messages. When a messages is retracted the original message MAY be replaced by a tombstone. Message retraction is done by means defined in &xep0424;. + A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. A MIX channel MAY limit the time frame in which a message is allowed to be retracted, for example to prevent retraction of very old messages. When a messages is retracted the original message MAY be replaced by a tombstone. Message retraction is done by sending a special message that identifies the original message. This mechanism allows the retraction to be distributed on the same path as the original message so that all participating servers and clients MAY honour the retraction. + + The protocol to request retraction is defined in &xep0424;. If a server is aware of message retractions it MUST advertise it's support by advertising 'urn:xmpp:message-retract:0' feature. The retract message MUST be addressed to the mix channel and the <apply-to> element (as defined in &xep0422;) MUST include an 'id' attribute that holds the stable-id (as defined in &xep0359;) of the original message send by the channel itself. A message and its retraction shown in the following example.

+ + A Message I did not mean to send + + + + + + + + +]]>

The MIX channel will allow a user to retract a message sent by the user if the 'Allow User Message Retraction' option is configured. The MIX channel will allow an administrative user to retract any message if the user is in the group specified by the 'Administrator Message Retraction Rights' option.

@@ -186,7 +205,25 @@

The second approach is to leave a tombstone. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted. + + With this approach, the original message is removed and replaced with a tombstone using the element qualified by the 'urn:xmpp:mix:misc:0' namespace that shows the JID of user performing the retraction and the time of the retraction. The tombstones are also defined in &xep0424;. A service which supports tombstones MUST advertise the 'urn:xmpp:message-retract:0#tombstone' feature in its Service Discovery responses. +

+ + + + + + + + + + + + +]]>
From 420cdbecaa7a36ca48e461f87e865de3f48660b8 Mon Sep 17 00:00:00 2001 From: Wojciech Kapcia Date: Fri, 14 May 2021 19:01:02 +0200 Subject: [PATCH 3/4] Remove old text and fix the build. --- xep-0407.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xep-0407.xml b/xep-0407.xml index abcecbb17..544706ce5 100644 --- a/xep-0407.xml +++ b/xep-0407.xml @@ -204,10 +204,7 @@ Two approaches to message retraction can be used. In the first approach, the retracted message is simply removed. This is appropriate where retraction is provided as a user service and the user has rights to remove messages sent from the record.

- The second approach is to leave a tombstone. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted. - - With this approach, the original message is removed and replaced with a tombstone using the element qualified by the 'urn:xmpp:mix:misc:0' namespace that shows the JID of user performing the retraction and the time of the retraction. The tombstones are also defined in &xep0424;. A service which supports tombstones MUST advertise the 'urn:xmpp:message-retract:0#tombstone' feature in its Service Discovery responses. - + The second approach is to leave a tombstone. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted. The tombstones are also defined in &xep0424;. A service which supports tombstones MUST advertise the 'urn:xmpp:message-retract:0#tombstone' feature in its Service Discovery responses.

Date: Fri, 3 Dec 2021 13:14:41 +0100 Subject: [PATCH 4/4] Improve message retraction in MIX example --- xep-0407.xml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/xep-0407.xml b/xep-0407.xml index 544706ce5..31b0e9017 100644 --- a/xep-0407.xml +++ b/xep-0407.xml @@ -32,6 +32,7 @@ XEP-0369 XEP-0372 XEP-0424 + XEP-0359 @@ -178,14 +179,28 @@ The protocol to request retraction is defined in &xep0424;. If a server is aware of message retractions it MUST advertise it's support by advertising 'urn:xmpp:message-retract:0' feature. The retract message MUST be addressed to the mix channel and the <apply-to> element (as defined in &xep0422;) MUST include an 'id' attribute that holds the stable-id (as defined in &xep0359;) of the original message send by the channel itself. A message and its retraction shown in the following example.

- + id='abcde' + type='groupchat'> A Message I did not mean to send - - +]]> + + A Message I did not mean to send + + + thirdwitch + hag66@shakespeare.example + + +]]> +