diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-06-28 20:18:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 20:18:07 +0200 |
commit | 4722f12fab65f3247cd253825d86206bfbfc6f95 (patch) | |
tree | 1427ae892019b4a8cc18c80bc86dc89aea2e907d /clientapi | |
parent | a5ea928d0fc52f0efb6607791ac59e18103b57de (diff) |
Fix setting `displayname` and `avatar_url` (#3125)
As per the spec, `displayname` and `avatar_url` may be empty.
Diffstat (limited to 'clientapi')
-rw-r--r-- | clientapi/routing/profile.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/clientapi/routing/profile.go b/clientapi/routing/profile.go index 8a44834e..c89ece41 100644 --- a/clientapi/routing/profile.go +++ b/clientapi/routing/profile.go @@ -104,12 +104,6 @@ func SetAvatarURL( if resErr := httputil.UnmarshalJSONRequest(req, &r); resErr != nil { return *resErr } - if r.AvatarURL == "" { - return util.JSONResponse{ - Code: http.StatusBadRequest, - JSON: spec.BadJSON("'avatar_url' must be supplied."), - } - } localpart, domain, err := gomatrixserverlib.SplitID('@', userID) if err != nil { @@ -199,12 +193,6 @@ func SetDisplayName( if resErr := httputil.UnmarshalJSONRequest(req, &r); resErr != nil { return *resErr } - if r.DisplayName == "" { - return util.JSONResponse{ - Code: http.StatusBadRequest, - JSON: spec.BadJSON("'displayname' must be supplied."), - } - } localpart, domain, err := gomatrixserverlib.SplitID('@', userID) if err != nil { |