1
0
Fork 0
forked from mirror/grapevine

fetch signing keys on join even when no cached keys for origin

Silly mistake
This commit is contained in:
Benjamin Lee 2024-09-01 01:16:41 -07:00
parent b4fecbc517
commit be14f5bddc
No known key found for this signature in database
GPG key ID: FB9624E2885D55A4
2 changed files with 12 additions and 9 deletions

View file

@ -168,6 +168,9 @@ This will be the first release of Grapevine since it was forked from Conduit
([!78](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/78))
15. Fix bug where expired keys may not be re-fetched in some scenarios.
([!78](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/78))
16. Fix bug where signing keys would not be fetched when joining a room if we
hadn't previously seen any signing keys from that server.
([!87](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/87))
### Added

View file

@ -1714,15 +1714,15 @@ impl Service {
trace!(server = %origin, "Loading signing keys for other server");
if let Some(result) = services().globals.signing_keys_for(origin)? {
if !contains_all_ids(&result) {
trace!(
server = %origin,
"Signing key not loaded for server",
);
servers.insert(origin.to_owned(), BTreeMap::new());
}
let result = services().globals.signing_keys_for(origin)?;
if !result.as_ref().is_some_and(contains_all_ids) {
trace!(
server = %origin,
"Signing key not loaded for server",
);
servers.insert(origin.to_owned(), BTreeMap::new());
}
if let Some(result) = result {
pub_key_map.insert(origin.to_string(), result);
}
}