mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
Always use local keypair instead of trying to find our own keys in cache
This commit is contained in:
parent
458a7458dc
commit
296824fef4
2 changed files with 10 additions and 3 deletions
|
|
@ -171,6 +171,11 @@ This will be the first release of Grapevine since it was forked from Conduit
|
||||||
16. Fix bug where signing keys would not be fetched when joining a room if we
|
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.
|
hadn't previously seen any signing keys from that server.
|
||||||
([!87](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/87))
|
([!87](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/87))
|
||||||
|
17. Fixed bug
|
||||||
|
([#48](https://gitlab.computer.surgery/matrix/grapevine-fork/-/issues/48))
|
||||||
|
that caused us to attempt to fetch our own signing keys from ourselves over
|
||||||
|
federation, and fail ("Won't send federation request to ourselves").
|
||||||
|
([!96](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/96))
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -435,9 +435,11 @@ impl Service {
|
||||||
&self,
|
&self,
|
||||||
origin: &ServerName,
|
origin: &ServerName,
|
||||||
) -> Result<Option<SigningKeys>> {
|
) -> Result<Option<SigningKeys>> {
|
||||||
Ok(self.db.signing_keys_for(origin)?.or_else(|| {
|
if origin == self.server_name() {
|
||||||
(origin == self.server_name()).then(SigningKeys::load_own_keys)
|
Ok(Some(SigningKeys::load_own_keys()))
|
||||||
}))
|
} else {
|
||||||
|
self.db.signing_keys_for(origin)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Filters the key map of multiple servers down to keys that should be
|
/// Filters the key map of multiple servers down to keys that should be
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue