From 7c19d24e3a52fd300f8ea53aae9eba92002657dc Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 21 Mar 2024 17:38:46 -0400 Subject: [PATCH] Do not allow setting m.push_rules account data directly. (#1763) * Do not allow setting m.push_rules account data directly. * Newsfragment * Update 1763.clarification Co-authored-by: Travis Ralston * add change notice Co-authored-by: Travis Ralston * clarify read status Co-authored-by: Travis Ralston * Fix link for push rules. * Refer to the error response --------- Co-authored-by: Travis Ralston --- .../newsfragments/1763.clarification | 1 + content/client-server-api/modules/account_data.md | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 changelogs/client_server/newsfragments/1763.clarification diff --git a/changelogs/client_server/newsfragments/1763.clarification b/changelogs/client_server/newsfragments/1763.clarification new file mode 100644 index 00000000..a4db76dd --- /dev/null +++ b/changelogs/client_server/newsfragments/1763.clarification @@ -0,0 +1 @@ +Clarify that the `m.push_rules` account data type cannot be set using the `/account_data` API, as per [MSC4010](https://github.com/matrix-org/matrix-spec-proposals/pull/4010). diff --git a/content/client-server-api/modules/account_data.md b/content/client-server-api/modules/account_data.md index 12233bcd..3068602d 100644 --- a/content/client-server-api/modules/account_data.md +++ b/content/client-server-api/modules/account_data.md @@ -26,6 +26,15 @@ These events can also be received in a `/events` response or in the #### Server Behaviour -Servers MUST reject clients from setting account data for event types -that the server manages. Currently, this only includes -[m.fully\_read](#mfully_read). +Servers MUST reject setting account data for event types +that the server manages by using a 405 error response. +Currently, this only includes [`m.fully_read`](#mfully_read) +and [`m.push_rules`](#push-rules-events). This applies to +both global and room-specific account data. + +{{% boxes/note %}} +{{% changed-in v="1.10" %}} `m.push_rules` was added to the rejection +list. +{{% /boxes/note %}} + +Servers must allow clients to read the above event types as normal.