From 6c7aecd67fc45dae0688ff12b0b6864b0358f494 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 24 Nov 2021 12:35:19 +0000 Subject: Use _clock again and note the typing problem --- synapse/visibility.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/visibility.py b/synapse/visibility.py index 17532059e9..cca1b275b2 100644 --- a/synapse/visibility.py +++ b/synapse/visibility.py @@ -146,7 +146,9 @@ async def filter_events_for_client( max_lifetime = retention_policy.get("max_lifetime") if max_lifetime is not None: - oldest_allowed_ts = storage.main.clock.time_msec() - max_lifetime + # TODO: reveal_type(storage.main) yields Any. Can we find a way of + # telling mypy that storage.main is a generic `DataStoreT`? + oldest_allowed_ts = storage.main._clock.time_msec() - max_lifetime if event.origin_server_ts < oldest_allowed_ts: return None -- cgit 1.5.1