summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorQuentin Gliech <quenting@element.io>2023-08-31 17:50:49 +0200
committerQuentin Gliech <quenting@element.io>2023-08-31 17:50:49 +0200
commit9c77557ab3fdecabc776a47a739a112745c78d82 (patch)
treef4e3ce3a3ae91273e8fb6589e0e422822738839e /synapse
parentIgnore redundant casts in latest deps CI job (#16213) (diff)
downloadsynapse-quenting/fix-device-deletion.tar.xz
Fix device deletion with MSC3861 enabled github/quenting/fix-device-deletion quenting/fix-device-deletion
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/databases/main/devices.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py
index fa69a4a298..8b78dc03d7 100644
--- a/synapse/storage/databases/main/devices.py
+++ b/synapse/storage/databases/main/devices.py
@@ -1664,6 +1664,7 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore):
         self.device_id_exists_cache: LruCache[
             Tuple[str, str], Literal[True]
         ] = LruCache(cache_name="device_id_exists", max_size=10000)
+        self.hs = hs
         self.config: HomeServerConfig = hs.config
 
     async def store_device(
@@ -1790,7 +1791,7 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore):
         #  device_id -> introspection_token
         if self.config.experimental.msc3861.enabled:
             # mypy ignore - the token cache is defined on MSC3861DelegatedAuth
-            self.auth._token_cache.invalidate_all()  # type: ignore[attr-defined]
+            self.hs.get_auth()._token_cache.invalidate_all()  # type: ignore[attr-defined]
             await self.stream_introspection_token_invalidation((None,))
 
     async def update_device(