mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 19:44:13 -05:00
Remove pointless create() method
It just calls the constructor, so we may as well kill it rather than having random codepaths.
This commit is contained in:
parent
b4a6b7f720
commit
631d7b87b5
6 changed files with 8 additions and 12 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue