summary refs log tree commit diff
path: root/synapse/app/admin_cmd.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-07-11 14:14:09 +0100
committerGitHub <noreply@github.com>2022-07-11 14:14:09 +0100
commite610128c507149e46d459bf97ba0fb6a8bd34b34 (patch)
treeedcdf7e7be701450d4352300462639673e9f5abd /synapse/app/admin_cmd.py
parentFix appservice EDUs failing to send if the EDU doesn't have a room ID (#13236) (diff)
downloadsynapse-e610128c507149e46d459bf97ba0fb6a8bd34b34.tar.xz
Add a `filter_event_for_clients_with_state` function (#13222)
Diffstat (limited to 'synapse/app/admin_cmd.py')
-rw-r--r--synapse/app/admin_cmd.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/app/admin_cmd.py b/synapse/app/admin_cmd.py
index 561621a285..87f82bd9a5 100644
--- a/synapse/app/admin_cmd.py
+++ b/synapse/app/admin_cmd.py
@@ -39,6 +39,7 @@ from synapse.replication.slave.storage.push_rule import SlavedPushRuleStore
 from synapse.replication.slave.storage.receipts import SlavedReceiptsStore
 from synapse.replication.slave.storage.registration import SlavedRegistrationStore
 from synapse.server import HomeServer
+from synapse.storage.database import DatabasePool, LoggingDatabaseConnection
 from synapse.storage.databases.main.room import RoomWorkerStore
 from synapse.types import StateMap
 from synapse.util import SYNAPSE_VERSION
@@ -60,7 +61,17 @@ class AdminCmdSlavedStore(
     BaseSlavedStore,
     RoomWorkerStore,
 ):
-    pass
+    def __init__(
+        self,
+        database: DatabasePool,
+        db_conn: LoggingDatabaseConnection,
+        hs: "HomeServer",
+    ):
+        super().__init__(database, db_conn, hs)
+
+        # Annoyingly `filter_events_for_client` assumes that this exists. We
+        # should refactor it to take a `Clock` directly.
+        self.clock = hs.get_clock()
 
 
 class AdminCmdServer(HomeServer):