summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorreivilibre <38398653+reivilibre@users.noreply.github.com>2021-09-10 17:03:18 +0100
committerGitHub <noreply@github.com>2021-09-10 17:03:18 +0100
commit524b8ead778e51adfd6667a33f2700f8e071c256 (patch)
treeb19acba4d0e2aac7bc5515f0496c8af95a972edd /synapse/handlers/appservice.py
parentFix 2 typos in docs/log_contexts.md (#10795) (diff)
downloadsynapse-524b8ead778e51adfd6667a33f2700f8e071c256.tar.xz
Add types to synapse.util. (#10601)
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r--synapse/handlers/appservice.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 4ab4046650..a7b5a4e9c9 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -131,6 +131,8 @@ class ApplicationServicesHandler:
 
                         now = self.clock.time_msec()
                         ts = await self.store.get_received_ts(event.event_id)
+                        assert ts is not None
+
                         synapse.metrics.event_processing_lag_by_event.labels(
                             "appservice_sender"
                         ).observe((now - ts) / 1000)
@@ -166,6 +168,7 @@ class ApplicationServicesHandler:
                     if events:
                         now = self.clock.time_msec()
                         ts = await self.store.get_received_ts(events[-1].event_id)
+                        assert ts is not None
 
                         synapse.metrics.event_processing_lag.labels(
                             "appservice_sender"