mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
modules/client/room_keys/version: Throw coded 404 for no version found.
This commit is contained in:
parent
109c30a76c
commit
b7d8f9c211
1 changed files with 4 additions and 7 deletions
|
@ -238,12 +238,9 @@ ircd::m::get_room_keys_version(client &client,
|
|||
}
|
||||
|
||||
if(!event_idx)
|
||||
return resource::response
|
||||
throw m::NOT_FOUND
|
||||
{
|
||||
client, json::members
|
||||
{
|
||||
{ "version", 0L },
|
||||
}
|
||||
"No version found.",
|
||||
};
|
||||
|
||||
if(m::room_id(event_idx) != user_room.room_id)
|
||||
|
@ -254,9 +251,9 @@ ircd::m::get_room_keys_version(client &client,
|
|||
};
|
||||
|
||||
if(m::redacted(event_idx))
|
||||
return resource::response
|
||||
throw m::NOT_FOUND
|
||||
{
|
||||
client, http::NOT_FOUND
|
||||
"No version found.",
|
||||
};
|
||||
|
||||
m::get(event_idx, "content", [&client, &event_idx]
|
||||
|
|
Loading…
Reference in a new issue