Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
5e8abe90
Unverified
Commit
5e8abe90
authored
5 years ago
by
Andrew Morgan
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Better errors regarding changing avatar_url (#6497)
parent
adfdd82b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/6497.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/6497.bugfix
synapse/rest/client/v1/profile.py
+8
-3
8 additions, 3 deletions
synapse/rest/client/v1/profile.py
with
9 additions
and
3 deletions
changelog.d/6497.bugfix
0 → 100644
+
1
−
0
View file @
5e8abe90
Fix error message when setting your profile's avatar URL mentioning displaynames, and prevent NoneType avatar_urls.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
synapse/rest/client/v1/profile.py
+
8
−
3
View file @
5e8abe90
...
...
@@ -103,11 +103,16 @@ class ProfileAvatarURLRestServlet(RestServlet):
content
=
parse_json_object_from_request
(
request
)
try
:
new_
name
=
content
[
"
avatar_url
"
]
new_
avatar_url
=
content
.
get
(
"
avatar_url
"
)
except
Exception
:
return
400
,
"
Unable to parse name
"
return
400
,
"
Unable to parse avatar_url
"
if
new_avatar_url
is
None
:
return
400
,
"
Missing required key: avatar_url
"
await
self
.
profile_handler
.
set_avatar_url
(
user
,
requester
,
new_name
,
is_admin
)
await
self
.
profile_handler
.
set_avatar_url
(
user
,
requester
,
new_avatar_url
,
is_admin
)
return
200
,
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment