Skip to content

Commit

Permalink
Expose user avatar URL field in the UI
Browse files Browse the repository at this point in the history
To be able to change a avatar the URL field needs to be exposed. This
way you can't upload any new files but you can use files which are already
on the server.

The URL needs to be a mxc:// one.
  • Loading branch information
jeena committed Aug 4, 2020
1 parent 1f56bac commit abad043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export const UserEdit = props => {
<TextInput source="id" disabled />
<TextInput source="displayname" />
<PasswordInput source="password" autoComplete="new-password" />
<TextInput source="avatar_url" />
<BooleanInput source="admin" />
<BooleanInput
source="deactivated"
Expand Down
1 change: 1 addition & 0 deletions src/synapse/dataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const resourceMap = {
...u,
id: u.name,
avatar_src: mxcUrlToHttp(u.avatar_url),
avatar_url: u.avatar_url,
is_guest: !!u.is_guest,
admin: !!u.admin,
deactivated: !!u.deactivated,
Expand Down

0 comments on commit abad043

Please sign in to comment.