Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Add some clarifying comments and refactor a portion of the Keyring class for readability #14804

Merged
merged 6 commits into from
Jan 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct some logic that was accidentally changed
  • Loading branch information
anoadragon453 committed Jan 9, 2023
commit d4d322c7f75c3e3fc40ad8ce78758d4db5c01cfa
2 changes: 1 addition & 1 deletion synapse/crypto/keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ async def _inner_fetch_key_request(
# If we already have a result for the given key ID, we keep the
# one with the highest `valid_until_ts`.
existing_key = found_keys.get(key_id)
if existing_key and existing_key.valid_until_ts > key.valid_until_ts:
if existing_key and existing_key.valid_until_ts >= key.valid_until_ts:
continue

# Check if this key's expiry timestamp is valid for the verify request.
Expand Down