Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal: Remove experimental support for MSC3852 #17640

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rahulporuri
Copy link

@rahulporuri rahulporuri commented Aug 30, 2024

fixes #14836 . This PR more or less reverts everything introduced in the PR matrix-org/synapse#13549

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@rahulporuri rahulporuri marked this pull request as ready for review August 30, 2024 17:33
@rahulporuri rahulporuri requested a review from a team as a code owner August 30, 2024 17:33
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Sorry, this is complicated by the fact that matrix-org/synapse#13549 both implemented MSC3852, as well as added a new feature to the Admin API. We should try and keep the latter.

@@ -0,0 +1 @@
Remove experimental support for MSC 3852.
Copy link
Member

Choose a reason for hiding this comment

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

Typically MSC's are written without a space in-between "MSC" and the number:

Suggested change
Remove experimental support for MSC 3852.
Remove experimental support for [MSC3852](https://github.com/matrix-org/matrix-spec-proposals/pull/3852).

@@ -857,15 +857,13 @@ A response body like the following is returned:
"device_id": "QBUAZIFURK",
"display_name": "android",
"last_seen_ip": "1.2.3.4",
"last_seen_user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0",
Copy link
Member

Choose a reason for hiding this comment

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

Hm, removing this field would be a backwards-incompatible change to the Admin API.

While this field was added to the Admin API in matrix-org/synapse#13549, it was not connected to the experimental_features.msc3852_enabled config option. But rather, always returned and not considered experimental.

It'd be best to keep this field in the Admin API. I could also see it as having been useful for moderation purposes.

@@ -1131,7 +1130,6 @@ def _update_device_from_client_ips(
ip = client_ips.get((device["user_id"], device["device_id"]))
device.update(
{
"last_seen_user_agent": ip.user_agent if ip else None,
Copy link
Member

Choose a reason for hiding this comment

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

I would leave this in, but keep the following code in the client endpoints:

        for device in devices:
            last_seen_user_agent = device["last_seen_user_agent"]
            del device["last_seen_user_agent"]

such that the field isn't exposed to clients, but remains exposed to the Admin API.

@@ -278,7 +278,6 @@ def test_devices(self) -> None:
self.assertEqual(args[0][0]["user_id"], self.user2)
self.assertIn("device_id", args[0][0])
self.assertIsNone(args[0][0]["display_name"])
self.assertIsNone(args[0][0]["last_seen_user_agent"])
Copy link
Member

Choose a reason for hiding this comment

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

I would keep this in.

@github-actions github-actions bot deployed to PR Documentation Preview September 10, 2024 17:16 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We should remove experimental support for MSC3852 as it has now closed
2 participants