0
0
Fork 0
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:
Jason Volk 2023-01-24 12:11:01 -08:00
parent 5d73109f0d
commit db4ebe1ba7

View file

@ -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