summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorreivilibre <38398653+reivilibre@users.noreply.github.com>2021-09-10 17:03:18 +0100
committerGitHub <noreply@github.com>2021-09-10 17:03:18 +0100
commit524b8ead778e51adfd6667a33f2700f8e071c256 (patch)
treeb19acba4d0e2aac7bc5515f0496c8af95a972edd /synapse/rest/client
parentFix 2 typos in docs/log_contexts.md (#10795) (diff)
downloadsynapse-524b8ead778e51adfd6667a33f2700f8e071c256.tar.xz
Add types to synapse.util. (#10601)
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/register.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/rest/client/register.py b/synapse/rest/client/register.py
index 8f3dd2a101..abe4d7e205 100644
--- a/synapse/rest/client/register.py
+++ b/synapse/rest/client/register.py
@@ -330,11 +330,11 @@ class UsernameAvailabilityRestServlet(RestServlet):
                 # Artificially delay requests if rate > sleep_limit/window_size
                 sleep_limit=1,
                 # Amount of artificial delay to apply
-                sleep_msec=1000,
+                sleep_delay=1000,
                 # Error with 429 if more than reject_limit requests are queued
                 reject_limit=1,
                 # Allow 1 request at a time
-                concurrent_requests=1,
+                concurrent=1,
             ),
         )
 
@@ -763,7 +763,10 @@ class RegisterRestServlet(RestServlet):
         Returns:
              dictionary for response from /register
         """
-        result = {"user_id": user_id, "home_server": self.hs.hostname}
+        result: JsonDict = {
+            "user_id": user_id,
+            "home_server": self.hs.hostname,
+        }
         if not params.get("inhibit_login", False):
             device_id = params.get("device_id")
             initial_display_name = params.get("initial_device_display_name")
@@ -814,7 +817,7 @@ class RegisterRestServlet(RestServlet):
             user_id, device_id, initial_display_name, is_guest=True
         )
 
-        result = {
+        result: JsonDict = {
             "user_id": user_id,
             "device_id": device_id,
             "access_token": access_token,