mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
modules/client/profile: Rewrite m::NOT_FOUND propagation for appropos response.
This commit is contained in:
parent
c999036a03
commit
ded4ed507e
1 changed files with 10 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue