Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove references to supporting per-user flag for msc2654 #15522

Merged
merged 4 commits into from May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15522.misc
@@ -0,0 +1 @@
Remove references to supporting per-user flag for msc2654 (#15522).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can't update the old changelog since it has shipped?

Suggested change
Remove references to supporting per-user flag for msc2654 (#15522).
Remove references to supporting per-user flag for [MSC2654](https://github.com/matrix-org/matrix-spec-proposals/pull/2654) (#15522).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only changelog that referenced MSC2654 is in #15345, which hasn't merged so I've already fixed that. The changelog for the first PR just said "Add an admin API to support per-user feature flags" and didn't mention the specific features involved.

6 changes: 2 additions & 4 deletions docs/admin_api/experimental_features.md
Expand Up @@ -2,8 +2,7 @@

This API allows a server administrator to enable or disable some experimental features on a per-user
basis. Currently supported features are [msc3026](https://github.com/matrix-org/matrix-spec-proposals/pull/3026): busy
presence state enabled, [msc2654](https://github.com/matrix-org/matrix-spec-proposals/pull/2654): enable unread counts,
[msc3881](https://github.com/matrix-org/matrix-spec-proposals/pull/3881): enable remotely toggling push notifications
presence state enabled, [msc3881](https://github.com/matrix-org/matrix-spec-proposals/pull/3881): enable remotely toggling push notifications
for another client, and [msc3967](https://github.com/matrix-org/matrix-spec-proposals/pull/3967): do not require
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these lower-case because they're meant to be constants? If so I think I'd make them code formatted. Otherwise I'd capitalize "MSC".

I'd also suggest making this a list so that it is easier to update in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks for the suggestion!

UIA when first uploading cross-signing keys.

Expand All @@ -19,7 +18,7 @@ provide a body containing the user id and listing the features to enable/disable
{
"features": {
"msc3026":true,
"msc2654":true
"msc3881":true
}
}
```
Expand All @@ -46,7 +45,6 @@ user like so:
{
"features": {
"msc3026": true,
"msc2654": true,
"msc3881": false,
"msc3967": false
}
Expand Down
1 change: 0 additions & 1 deletion synapse/rest/admin/experimental_features.py
Expand Up @@ -33,7 +33,6 @@ class ExperimentalFeature(str, Enum):
"""

MSC3026 = "msc3026"
MSC2654 = "msc2654"
MSC3881 = "msc3881"
MSC3967 = "msc3967"

Expand Down
8 changes: 2 additions & 6 deletions tests/rest/admin/test_admin.py
Expand Up @@ -399,7 +399,7 @@ def test_enable_and_disable(self) -> None:
"PUT",
url,
content={
"features": {"msc3026": True, "msc2654": True},
"features": {"msc3026": True, "msc3881": True},
},
access_token=self.admin_user_tok,
)
Expand All @@ -420,7 +420,7 @@ def test_enable_and_disable(self) -> None:
)
self.assertEqual(
True,
channel.json_body["features"]["msc2654"],
channel.json_body["features"]["msc3881"],
)

# test disabling a feature works
Expand Down Expand Up @@ -448,10 +448,6 @@ def test_enable_and_disable(self) -> None:
)
self.assertEqual(
True,
channel.json_body["features"]["msc2654"],
)
self.assertEqual(
False,
channel.json_body["features"]["msc3881"],
)
self.assertEqual(
Expand Down