mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-25 09:44:11 +01:00
don't give up if we can't create default avatars during tests
This commit is contained in:
parent
adc4310a73
commit
37b6b880ef
1 changed files with 12 additions and 9 deletions
|
@ -103,6 +103,7 @@ class RegistrationHandler(BaseHandler):
|
||||||
# XXX: ideally clients would explicitly specify one, but given they don't
|
# XXX: ideally clients would explicitly specify one, but given they don't
|
||||||
# and we want consistent and pretty identicons for random users, we'll
|
# and we want consistent and pretty identicons for random users, we'll
|
||||||
# do it here.
|
# do it here.
|
||||||
|
try:
|
||||||
auth_user = UserID.from_string(user_id)
|
auth_user = UserID.from_string(user_id)
|
||||||
identicon_resource = self.hs.get_resource_for_media_repository().getChildWithDefault("identicon", None)
|
identicon_resource = self.hs.get_resource_for_media_repository().getChildWithDefault("identicon", None)
|
||||||
upload_resource = self.hs.get_resource_for_media_repository().getChildWithDefault("upload", None)
|
upload_resource = self.hs.get_resource_for_media_repository().getChildWithDefault("upload", None)
|
||||||
|
@ -112,6 +113,8 @@ class RegistrationHandler(BaseHandler):
|
||||||
)
|
)
|
||||||
profile_handler = self.hs.get_handlers().profile_handler
|
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
|
||||||
|
|
||||||
defer.returnValue((user_id, token))
|
defer.returnValue((user_id, token))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue