diff options
author | Will Hunt <will@half-shot.uk> | 2020-12-07 19:13:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 19:13:07 +0000 |
commit | ff1f0ee09472b554832fb39952f389d01a4233ac (patch) | |
tree | e849c2a69a6920e7e15f5109f27ff6358f1ab70c /synapse/rest/admin/users.py | |
parent | Do not raise a 500 exception when previewing empty media. (#8883) (diff) | |
download | synapse-ff1f0ee09472b554832fb39952f389d01a4233ac.tar.xz |
Call set_avatar_url with target_user, not user_id (#8872)
* Call set_avatar_url with target_user, not user_id Fixes https://github.com/matrix-org/synapse/issues/8871 * Create 8872.bugfix * Update synapse/rest/admin/users.py Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> * Testing * Update changelog.d/8872.bugfix Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Diffstat (limited to 'synapse/rest/admin/users.py')
-rw-r--r-- | synapse/rest/admin/users.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py index 90940ff185..88cba369f5 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py @@ -320,9 +320,9 @@ class UserRestServletV2(RestServlet): data={}, ) - if "avatar_url" in body and type(body["avatar_url"]) == str: + if "avatar_url" in body and isinstance(body["avatar_url"], str): await self.profile_handler.set_avatar_url( - user_id, requester, body["avatar_url"], True + target_user, requester, body["avatar_url"], True ) ret = await self.admin_handler.get_user(target_user) |