0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-15 17:16:49 +01: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) if(!event_idx)
return resource::response throw m::NOT_FOUND
{ {
client, json::members "No version found.",
{
{ "version", 0L },
}
}; };
if(m::room_id(event_idx) != user_room.room_id) 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)) 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] m::get(event_idx, "content", [&client, &event_idx]