mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
modules/m_keys: Fix feds::keys result interpretation.
This commit is contained in:
parent
51c6620e2c
commit
b0e60fc3fc
1 changed files with 9 additions and 2 deletions
|
@ -398,6 +398,8 @@ ircd::m::keys::get(const queries &queries,
|
|||
opts.reserve(queries.size());
|
||||
for(const auto &[server_name, key_id] : queries)
|
||||
{
|
||||
assert(key_id);
|
||||
assert(server_name);
|
||||
const bool cached
|
||||
{
|
||||
cache::get(server_name, key_id, [&ret, &closure]
|
||||
|
@ -442,12 +444,17 @@ ircd::m::keys::get(const queries &queries,
|
|||
m::feds::execute(opts, [&ret, &closure]
|
||||
(const auto &result)
|
||||
{
|
||||
if(empty(result.object))
|
||||
const json::array &server_keys
|
||||
{
|
||||
result.object["server_keys"]
|
||||
};
|
||||
|
||||
if(empty(server_keys))
|
||||
return true;
|
||||
|
||||
const m::keys keys
|
||||
{
|
||||
result.object
|
||||
server_keys
|
||||
};
|
||||
|
||||
if(!verify(keys, std::nothrow))
|
||||
|
|
Loading…
Reference in a new issue