summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-15 10:07:01 +0000
committerDavid Baker <dave@matrix.org>2016-01-15 10:07:01 +0000
commitac12b6d33278713d12d5854997f698322b4dacb7 (patch)
tree99435a203ac323ee4b59b57677b79ce9d205d440
parentMerge pull request #499 from matrix-org/invalid_user_name (diff)
parentM_INVALID_USERNAME to be consistent with the parameter name (diff)
downloadsynapse-ac12b6d33278713d12d5854997f698322b4dacb7.tar.xz
Merge branch 'invalid_user_name' into develop
-rw-r--r--synapse/api/errors.py2
-rw-r--r--synapse/handlers/register.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index e6d32acced..ce0fc53668 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -42,7 +42,7 @@ class Codes(object):
     EXCLUSIVE = "M_EXCLUSIVE"
     THREEPID_AUTH_FAILED = "M_THREEPID_AUTH_FAILED"
     THREEPID_IN_USE = "THREEPID_IN_USE"
-    INVALID_USER_NAME = "M_INVALID_USER_NAME"
+    INVALID_USERNAME = "M_INVALID_USERNAME"
 
 
 class CodeMessageException(RuntimeError):
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 83f4daaa8c..8e601b052b 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -54,7 +54,7 @@ class RegistrationHandler(BaseHandler):
                 400,
                 "User ID must only contain characters which do not"
                 " require URL encoding.",
-                Codes.INVALID_USER_NAME
+                Codes.INVALID_USERNAME
             )
 
         user = UserID(localpart, self.hs.hostname)