From 8ff493916a084b4b251bb4a680c6562ef67fd5c8 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 25 Dec 2019 00:12:06 -0800 Subject: [PATCH] ircd::m::keys: Send old keys to cache first. --- matrix/keys.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix/keys.cc b/matrix/keys.cc index 05659820b..c6b1c0c51 100644 --- a/matrix/keys.cc +++ b/matrix/keys.cc @@ -487,14 +487,14 @@ ircd::m::keys::cache::set(const json::object &keys) size_t ret{0}; static const size_t max{32}; - const json::object &vks{keys["verify_keys"]}; - for(auto it(begin(vks)); it != end(vks) && ret < max; ++it, ++ret) - send_to_cache(*it); - const json::object &old_vks{keys["old_verify_keys"]}; for(auto it(begin(old_vks)); it != end(old_vks) && ret < max; ++it, ++ret) send_to_cache(*it); + const json::object &vks{keys["verify_keys"]}; + for(auto it(begin(vks)); it != end(vks) && ret < max; ++it, ++ret) + send_to_cache(*it); + return ret; }