summary refs log tree commit diff
path: root/synapse/module_api/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-20 11:59:14 +0100
committerErik Johnston <erik@matrix.org>2019-06-20 11:59:14 +0100
commit45f28a9d2fc0466dcf2a05b0063b7caa3b7e12c3 (patch)
tree07bb21377c6611db89f64f948a2e27645662ff0e /synapse/module_api/__init__.py
parentAdd descriptions and remove redundant set(..) (diff)
parentRun Black. (#5482) (diff)
downloadsynapse-45f28a9d2fc0466dcf2a05b0063b7caa3b7e12c3.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/histogram_extremities
Diffstat (limited to 'synapse/module_api/__init__.py')
-rw-r--r--synapse/module_api/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py
index b3abd1b3c6..bf43ca09be 100644
--- a/synapse/module_api/__init__.py
+++ b/synapse/module_api/__init__.py
@@ -21,6 +21,7 @@ class ModuleApi(object):
     """A proxy object that gets passed to password auth providers so they
     can register new users etc if necessary.
     """
+
     def __init__(self, hs, auth_handler):
         self.hs = hs
 
@@ -57,7 +58,7 @@ class ModuleApi(object):
         Returns:
             str: qualified @user:id
         """
-        if username.startswith('@'):
+        if username.startswith("@"):
             return username
         return UserID(username, self.hs.hostname).to_string()
 
@@ -89,8 +90,7 @@ class ModuleApi(object):
         # Register the user
         reg = self.hs.get_registration_handler()
         user_id, access_token = yield reg.register(
-            localpart=localpart, default_display_name=displayname,
-            bind_emails=emails,
+            localpart=localpart, default_display_name=displayname, bind_emails=emails
         )
 
         defer.returnValue((user_id, access_token))