diff options
author | Erik Johnston <erik@matrix.org> | 2015-02-10 17:34:51 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-02-10 17:34:51 +0000 |
commit | eae0842bc17b8af75bcb599866a5df8670fac754 (patch) | |
tree | a79e00280a48b6d56eae9c9ce6dee4448b4a119c /synapse/handlers/register.py | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into state-chache (diff) | |
parent | Log all the exits from _attempt_new_transaction (diff) | |
download | synapse-eae0842bc17b8af75bcb599866a5df8670fac754.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
Diffstat (limited to 'synapse/handlers/register.py')
-rw-r--r-- | synapse/handlers/register.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 4f06c487b1..0247327eb9 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -105,17 +105,20 @@ class RegistrationHandler(BaseHandler): # do it here. try: auth_user = UserID.from_string(user_id) - identicon_resource = self.hs.get_resource_for_media_repository().getChildWithDefault("identicon", None) - upload_resource = self.hs.get_resource_for_media_repository().getChildWithDefault("upload", None) + media_repository = self.hs.get_resource_for_media_repository() + identicon_resource = media_repository.getChildWithDefault("identicon", None) + upload_resource = media_repository.getChildWithDefault("upload", None) identicon_bytes = identicon_resource.generate_identicon(user_id, 320, 320) content_uri = yield upload_resource.create_content( "image/png", None, identicon_bytes, len(identicon_bytes), auth_user ) profile_handler = self.hs.get_handlers().profile_handler - profile_handler.set_avatar_url(auth_user, auth_user, ("%s#auto" % content_uri)) + profile_handler.set_avatar_url( + auth_user, auth_user, ("%s#auto" % (content_uri,)) + ) except NotImplementedError: - pass # make tests pass without messing around creating default avatars - + pass # make tests pass without messing around creating default avatars + defer.returnValue((user_id, token)) @defer.inlineCallbacks |