-
Notifications
You must be signed in to change notification settings - Fork 158
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Remove experimental support for MSC 3852. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 It'd be best to keep this field in the Admin API. I could also see it as having been useful for moderation purposes. |
||
"last_seen_ts": 1474491775024, | ||
"user_id": "<user_id>" | ||
}, | ||
{ | ||
"device_id": "AUIECTSRND", | ||
"display_name": "ios", | ||
"last_seen_ip": "1.2.3.5", | ||
"last_seen_user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", | ||
"last_seen_ts": 1474491775025, | ||
"user_id": "<user_id>" | ||
} | ||
|
@@ -892,8 +890,6 @@ The following fields are returned in the JSON response body: | |
Absent if no name has been set. | ||
- `last_seen_ip` - The IP address where this device was last seen. | ||
(May be a few minutes out of date, for efficiency reasons). | ||
- `last_seen_user_agent` - The user agent of the device when it was last seen. | ||
(May be a few minutes out of date, for efficiency reasons). | ||
- `last_seen_ts` - The timestamp (in milliseconds since the unix epoch) when this | ||
devices was last seen. (May be a few minutes out of date, for efficiency reasons). | ||
- `user_id` - Owner of device. | ||
|
@@ -972,7 +968,6 @@ A response body like the following is returned: | |
"device_id": "<device_id>", | ||
"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", | ||
"last_seen_ts": 1474491775024, | ||
"user_id": "<user_id>" | ||
} | ||
|
@@ -994,8 +989,6 @@ The following fields are returned in the JSON response body: | |
Absent if no name has been set. | ||
- `last_seen_ip` - The IP address where this device was last seen. | ||
(May be a few minutes out of date, for efficiency reasons). | ||
- `last_seen_user_agent` - The user agent of the device when it was last seen. | ||
(May be a few minutes out of date, for efficiency reasons). | ||
- `last_seen_ts` - The timestamp (in milliseconds since the unix epoch) when this | ||
devices was last seen. (May be a few minutes out of date, for efficiency reasons). | ||
- `user_id` - Owner of device. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,6 @@ def __init__(self, hs: "HomeServer"): | |
self._auth_handler = hs.get_auth_handler() | ||
self._event_sources = hs.get_event_sources() | ||
self.server_name = hs.hostname | ||
self._msc3852_enabled = hs.config.experimental.msc3852_enabled | ||
self._query_appservices_for_keys = ( | ||
hs.config.experimental.msc3984_appservice_key_query | ||
) | ||
|
@@ -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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
"last_seen_ts": ip.last_seen if ip else None, | ||
"last_seen_ip": ip.ip if ip else None, | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would keep this in. |
||
self.assertIsNone(args[0][0]["last_seen_ts"]) | ||
self.assertIsNone(args[0][0]["last_seen_ip"]) | ||
|
||
|
There was a problem hiding this comment.
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: