From 3ea10a8c2adf3b3d2bd8ec889a762d3b161ddeca Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:37:08 +0200 Subject: [PATCH 1/7] Create 0000-moderation-hidden.md --- proposals/0000-moderation-hidden.md | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 proposals/0000-moderation-hidden.md diff --git a/proposals/0000-moderation-hidden.md b/proposals/0000-moderation-hidden.md new file mode 100644 index 00000000000..2661c4971e6 --- /dev/null +++ b/proposals/0000-moderation-hidden.md @@ -0,0 +1,41 @@ +## Motivation +When an account with an offensive profile (profile picture, username...) is removed from a room, +many clients will render the profile with a message such as " was banned". +This essentially cements the string in the room history. + +## Proposal +Add a top-level `m.moderation_hidden` key to the content of an event. The format is as follows: +``` +{ + "level": , + "tags": +} +``` + +`` is a string referring to the *level* of percieved need to hide the event. Valid keys are: + +##### `"spoiler"` +Show the event's presence, but hide its contents. + +##### `"hidden"` +Hide it by default, display for moderators and client debug views. + +Tags is a list of strings representing content warnings that ought to be applied to the event. +Clients can choose to match on the tag list when deciding how to interpret the event. + +Example: +```json +{ + "level": "spoiler", + "tags": ["nsfw"] +} +``` + +## Unstable prefix +Use `org.itycodes.msc0000.moderation_hidden` in place of `m.moderation_hidden`. + +## Further work +Standardizing the list of tags + +## Security implications +None known From bdf19d8ca3d43eec0196d16213013fa9ef074684 Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:40:44 +0200 Subject: [PATCH 2/7] Rename 0000-moderation-hidden.md to 4179-moderation-hidden.md --- .../{0000-moderation-hidden.md => 4179-moderation-hidden.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename proposals/{0000-moderation-hidden.md => 4179-moderation-hidden.md} (100%) diff --git a/proposals/0000-moderation-hidden.md b/proposals/4179-moderation-hidden.md similarity index 100% rename from proposals/0000-moderation-hidden.md rename to proposals/4179-moderation-hidden.md From 843ffddbb8ef1df41d048f95e566568471c4155a Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:41:22 +0200 Subject: [PATCH 3/7] Update 4179-moderation-hidden.md --- proposals/4179-moderation-hidden.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/4179-moderation-hidden.md b/proposals/4179-moderation-hidden.md index 2661c4971e6..82c8828da31 100644 --- a/proposals/4179-moderation-hidden.md +++ b/proposals/4179-moderation-hidden.md @@ -32,7 +32,7 @@ Example: ``` ## Unstable prefix -Use `org.itycodes.msc0000.moderation_hidden` in place of `m.moderation_hidden`. +Use `org.itycodes.msc4179.moderation_hidden` in place of `m.moderation_hidden`. ## Further work Standardizing the list of tags From 7c2ed08183effb85711ff6ad7edb8c0898d6bc47 Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:11:43 +0200 Subject: [PATCH 4/7] Update 4179-moderation-hidden.md --- proposals/4179-moderation-hidden.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proposals/4179-moderation-hidden.md b/proposals/4179-moderation-hidden.md index 82c8828da31..84919267358 100644 --- a/proposals/4179-moderation-hidden.md +++ b/proposals/4179-moderation-hidden.md @@ -31,6 +31,12 @@ Example: } ``` +## Client implementation +A client should offer a three-state option in its settings about the interpretation of the hints. +- Respect the hints +- Treat `hidden` as `spoiler` +- Ignore the hints + ## Unstable prefix Use `org.itycodes.msc4179.moderation_hidden` in place of `m.moderation_hidden`. From 1250b1cf04b1423172f6ce643c0ae219b0c3fc27 Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Mon, 19 Aug 2024 18:31:38 +0200 Subject: [PATCH 5/7] Update 4179-moderation-hidden.md - Spelling --- proposals/4179-moderation-hidden.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/4179-moderation-hidden.md b/proposals/4179-moderation-hidden.md index 84919267358..5063bae2d58 100644 --- a/proposals/4179-moderation-hidden.md +++ b/proposals/4179-moderation-hidden.md @@ -12,7 +12,7 @@ Add a top-level `m.moderation_hidden` key to the content of an event. The format } ``` -`` is a string referring to the *level* of percieved need to hide the event. Valid keys are: +`` is a string referring to the *level* of perceived need to hide the event. Valid keys are: ##### `"spoiler"` Show the event's presence, but hide its contents. From 997543884f5ade2c7aeb7e93113d0f2a6f1f6206 Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:29:19 +0200 Subject: [PATCH 6/7] Update 4179-moderation-hidden.md - Comparison with #3531 --- proposals/4179-moderation-hidden.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/proposals/4179-moderation-hidden.md b/proposals/4179-moderation-hidden.md index 5063bae2d58..afeef31ffba 100644 --- a/proposals/4179-moderation-hidden.md +++ b/proposals/4179-moderation-hidden.md @@ -31,6 +31,11 @@ Example: } ``` +This key should be retroactively editable. +Since this is intended primarily for state events, this also means allowing the modification of this part of a state event. +Thankfully, this is only metadata, and it does not change the actual protocoal-critical parts of the stat event, so there should be no problem, +but it's important to mention it nonetheless. + ## Client implementation A client should offer a three-state option in its settings about the interpretation of the hints. - Respect the hints @@ -40,6 +45,18 @@ A client should offer a three-state option in its settings about the interpretat ## Unstable prefix Use `org.itycodes.msc4179.moderation_hidden` in place of `m.moderation_hidden`. +## Comparison with #3531 +##### Motivation +#3531 is primarily for hiding message events pending moderation, while #4179 is for hiding state events that have already happened but include content that one might not wish to be visible +(such as a user with an offensive MXID getting banned). +#3531 is likely to have the hidden status of an event retracted and the message deleted, while #4179 is unlikely to have the hidden status modified after the event has been sent +##### Granularity +#3531 is less granular. Its `visibility: hidden` corresponds to the `hidden` level in #4179, but there is no equivalent of the `spoiler` level. +Additionally, #3531 uses a free-form string, which cannot be automatically matched on by a client, while #4179 uses a tag list +(allowing someone to customize what events they are okay with seeing, and allowing optional fine-grained control over the completeness vs safety of room history per-client) +##### Race condition +#3531 requires the sending of a separate event, while #4179 has no such race condition, plus piggy-backs off of edit events for changing the content. + ## Further work Standardizing the list of tags From 7b1c3187e820767207d040c10a05f7bfdeeb09ca Mon Sep 17 00:00:00 2001 From: tranquillity-codes <120999089+tranquillity-codes@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:08:13 +0200 Subject: [PATCH 7/7] Update 4179-moderation-hidden.md --- proposals/4179-moderation-hidden.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/proposals/4179-moderation-hidden.md b/proposals/4179-moderation-hidden.md index afeef31ffba..c1ea0b3f015 100644 --- a/proposals/4179-moderation-hidden.md +++ b/proposals/4179-moderation-hidden.md @@ -15,7 +15,11 @@ Add a top-level `m.moderation_hidden` key to the content of an event. The format `` is a string referring to the *level* of perceived need to hide the event. Valid keys are: ##### `"spoiler"` -Show the event's presence, but hide its contents. +Show the event's presence, but hide its user-contents with a [spoiler](https://spec.matrix.org/latest/client-server-api/#spoiler-messages). +Example HTML +```html +@AVeryOffensiveUsername:example.com was banned +``` ##### `"hidden"` Hide it by default, display for moderators and client debug views. @@ -37,11 +41,16 @@ Thankfully, this is only metadata, and it does not change the actual protocoal-c but it's important to mention it nonetheless. ## Client implementation -A client should offer a three-state option in its settings about the interpretation of the hints. +A client should offer a three-state option in its settings about the interpretation of the hints - Respect the hints - Treat `hidden` as `spoiler` - Ignore the hints +Plus a toggle option to +- Redact `spoiler` contents + +Where an event such as `AVeryOffensiveUsername was banned` would be rendered as `[redacted] was banned` + ## Unstable prefix Use `org.itycodes.msc4179.moderation_hidden` in place of `m.moderation_hidden`.