mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/client/profile: Respond with empty object for user's own empty profile.
This commit is contained in:
parent
5d73109f0d
commit
db4ebe1ba7
1 changed files with 7 additions and 0 deletions
|
@ -214,6 +214,13 @@ get__profile(client &client,
|
|||
if(empty && eptr && !my(user))
|
||||
rethrow(eptr, user, param);
|
||||
|
||||
// Riot throws uncaught exceptions when its own empty profile 404's.
|
||||
if(empty && request.user_id == user_id)
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
|
||||
// Otherwise if there's no profile data we 404 our client.
|
||||
if(empty)
|
||||
throw m::NOT_FOUND
|
||||
|
|
Loading…
Reference in a new issue