0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-01 19:22:53 +01:00

modules/client/profile: Rewrite m::NOT_FOUND propagation for appropos response.

This commit is contained in:
Jason Volk 2018-04-02 22:12:25 -07:00
parent c999036a03
commit ded4ed507e

View file

@ -261,6 +261,7 @@ void
profile_get(const m::user &user,
const string_view &key,
const m::user::profile_closure &closure)
try
{
const m::user::room user_room
{
@ -278,6 +279,15 @@ profile_get(const m::user &user,
closure(value);
});
}
catch(const m::NOT_FOUND &e)
{
throw m::NOT_FOUND
{
"Nothing about '%s' and/or profile for '%s'",
key,
string_view{user.user_id}
};
}
m::event::id::buf
profile_set(const m::user &user,