summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/events/builder.py2
-rw-r--r--synapse/handlers/auth.py2
-rw-r--r--synapse/handlers/room.py4
-rw-r--r--synapse/rest/client/v1/login.py6
-rw-r--r--synapse/rest/client/v2_alpha/groups.py2
-rw-r--r--synapse/types.py4
7 files changed, 9 insertions, 13 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index bee4aba625..c867d1cfd8 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -16,4 +16,4 @@
 """ This is a reference implementation of a Matrix home server.
 """
 
-__version__ = "0.23.1"
+__version__ = "0.24.0"
diff --git a/synapse/events/builder.py b/synapse/events/builder.py
index 365fd96bd2..13fbba68c0 100644
--- a/synapse/events/builder.py
+++ b/synapse/events/builder.py
@@ -55,7 +55,7 @@ class EventBuilderFactory(object):
 
         local_part = str(int(self.clock.time())) + i + random_string(5)
 
-        e_id = EventID.create(local_part, self.hostname)
+        e_id = EventID(local_part, self.hostname)
 
         return e_id.to_string()
 
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index b00446bec0..9cef9d184b 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -267,7 +267,7 @@ class AuthHandler(BaseHandler):
         user_id = authdict["user"]
         password = authdict["password"]
         if not user_id.startswith('@'):
-            user_id = UserID.create(user_id, self.hs.hostname).to_string()
+            user_id = UserID(user_id, self.hs.hostname).to_string()
 
         return self._check_password(user_id, password)
 
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 535ba9517c..e945bd35bc 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -91,7 +91,7 @@ class RoomCreationHandler(BaseHandler):
                 if wchar in config["room_alias_name"]:
                     raise SynapseError(400, "Invalid characters in room alias")
 
-            room_alias = RoomAlias.create(
+            room_alias = RoomAlias(
                 config["room_alias_name"],
                 self.hs.hostname,
             )
@@ -123,7 +123,7 @@ class RoomCreationHandler(BaseHandler):
         while attempts < 5:
             try:
                 random_string = stringutils.random_string(18)
-                gen_room_id = RoomID.create(
+                gen_room_id = RoomID(
                     random_string,
                     self.hs.hostname,
                 )
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index a43410fb37..9536e8ade6 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -211,7 +211,7 @@ class LoginRestServlet(ClientV1RestServlet):
         user_id = identifier["user"]
 
         if not user_id.startswith('@'):
-            user_id = UserID.create(
+            user_id = UserID(
                 user_id, self.hs.hostname
             ).to_string()
 
@@ -278,7 +278,7 @@ class LoginRestServlet(ClientV1RestServlet):
         if user is None:
             raise LoginError(401, "Invalid JWT", errcode=Codes.UNAUTHORIZED)
 
-        user_id = UserID.create(user, self.hs.hostname).to_string()
+        user_id = UserID(user, self.hs.hostname).to_string()
         auth_handler = self.auth_handler
         registered_user_id = yield auth_handler.check_user_exists(user_id)
         if registered_user_id:
@@ -444,7 +444,7 @@ class CasTicketServlet(ClientV1RestServlet):
                 if required_value != actual_value:
                     raise LoginError(401, "Unauthorized", errcode=Codes.UNAUTHORIZED)
 
-        user_id = UserID.create(user, self.hs.hostname).to_string()
+        user_id = UserID(user, self.hs.hostname).to_string()
         auth_handler = self.auth_handler
         registered_user_id = yield auth_handler.check_user_exists(user_id)
         if not registered_user_id:
diff --git a/synapse/rest/client/v2_alpha/groups.py b/synapse/rest/client/v2_alpha/groups.py
index d11bccc1da..100f47ca9e 100644
--- a/synapse/rest/client/v2_alpha/groups.py
+++ b/synapse/rest/client/v2_alpha/groups.py
@@ -412,7 +412,7 @@ class GroupCreateServlet(RestServlet):
         # TODO: Create group on remote server
         content = parse_json_object_from_request(request)
         localpart = content.pop("localpart")
-        group_id = GroupID.create(localpart, self.server_name).to_string()
+        group_id = GroupID(localpart, self.server_name).to_string()
 
         result = yield self.groups_handler.create_group(group_id, user_id, content)
 
diff --git a/synapse/types.py b/synapse/types.py
index 5e3d1fc0b2..1eeda0b72f 100644
--- a/synapse/types.py
+++ b/synapse/types.py
@@ -132,10 +132,6 @@ class DomainSpecificString(
 
     __str__ = to_string
 
-    @classmethod
-    def create(cls, localpart, domain,):
-        return cls(localpart=localpart, domain=domain)
-
 
 class UserID(DomainSpecificString):
     """Structure representing a user ID."""