diff --git a/changelog.d/13412.feature b/changelog.d/13412.feature
index 1b5f6128bc..26ba06a293 100644
--- a/changelog.d/13412.feature
+++ b/changelog.d/13412.feature
@@ -1 +1 @@
-Add `do_not_use_to_device_limit` field to sync filter. This is an experiment to see if it improves sync performance.
+Add `org.matrix.unstable.to_device_limit` field to sync filter. This is an experiment to see if it improves sync performance.
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index 69203fb2dd..45ea51316f 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -136,7 +136,7 @@ USER_FILTER_SCHEMA = {
},
# This is an experiment, a MSC will follow if it happens to be useful
# for clients sync performance
- "do_not_use_to_device_limit": {"type": "number"},
+ "org.matrix.unstable.to_device_limit": {"type": "number"},
},
"additionalProperties": False,
}
@@ -224,7 +224,9 @@ class FilterCollection:
self.to_device_limit = 100
if hs.config.experimental.to_device_limit_enabled:
- self.to_device_limit = filter_json.get("do_not_use_to_device_limit", 100)
+ self.to_device_limit = filter_json.get(
+ "org.matrix.unstable.to_device_limit", 100
+ )
# We don't want to overload the server so let's limit it to under a thousand
if self.to_device_limit > 1000:
self.to_device_limit = 1000
diff --git a/tests/rest/client/test_sync.py b/tests/rest/client/test_sync.py
index 6937dd4489..e45436af4f 100644
--- a/tests/rest/client/test_sync.py
+++ b/tests/rest/client/test_sync.py
@@ -991,7 +991,7 @@ class ToDeviceLimitTestCase(unittest.HomeserverTestCase):
)
self.assertEqual(chan.code, 200, chan.result)
- # This does an incremental sync for user kermit with do_not_use_to_device_limit
+ # This does an incremental sync for user kermit with org.matrix.unstable.to_device_limit
# setted and check the number of returned to_device msgs against
# expected_to_device_msgs value
def _limited_sync_and_check(
@@ -999,7 +999,7 @@ class ToDeviceLimitTestCase(unittest.HomeserverTestCase):
) -> None:
channel = self.make_request(
"GET",
- f'/sync?since={self.next_batch}&filter={{"do_not_use_to_device_limit": {to_device_limit}}}',
+ f'/sync?since={self.next_batch}&filter={{"org.matrix.unstable.to_device_limit": {to_device_limit}}}',
access_token=self.tok,
)
self.assertEqual(channel.code, 200)
|