Fix "Store relayer's own result"

This commit is contained in:
Jason Rhinelander 2021-06-08 16:05:46 -03:00
parent 3430fa41b7
commit 71bddf96bd

View file

@ -466,7 +466,9 @@ void RequestHandler::process_client_req(
// If we're recursive then put our stuff inside "swarm" alongside all the other results,
// otherwise keep it top-level
auto& mine = res->result["swarm"][service_node_.own_address().pubkey_ed25519.hex()];
auto& mine = req.recurse
? res->result["swarm"][service_node_.own_address().pubkey_ed25519.hex()]
: res->result;
if (auto deleted = service_node_.delete_all_messages(req.pubkey)) {
auto msgs = json::array();