0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

modules/client/room_keys/version: Throw coded 404 for no version found.

This commit is contained in:
Jason Volk 2020-05-11 02:10:54 -07:00
parent 109c30a76c
commit b7d8f9c211

View file

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