summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/appservice/__init__.py7
-rw-r--r--synapse/handlers/appservice.py2
2 files changed, 3 insertions, 6 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py
index 247d84ad5c..01db2b2ae3 100644
--- a/synapse/appservice/__init__.py
+++ b/synapse/appservice/__init__.py
@@ -238,8 +238,8 @@ class ApplicationService:
     async def is_interested_in_event(
         self,
         event: EventBase,
+        store: "DataStore",
         cache_context: _CacheContext,
-        store: Optional["DataStore"] = None,
     ) -> bool:
         """Check if this service is interested in this event.
 
@@ -267,10 +267,7 @@ class ApplicationService:
         ):
             return True
 
-        # TODO: The store is only optional here to aid testing this function. We should
-        #  instead convert the tests to use HomeServerTestCase in order to get a working
-        #  database instance.
-        if store is not None and await self.is_interested_in_room(
+        if await self.is_interested_in_room(
             event.room_id, store, on_invalidate=cache_context.invalidate
         ):
             return True
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 3dc0d89530..fb533188a2 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -768,7 +768,7 @@ class ApplicationServicesHandler:
         # inside of a list comprehension anymore.
         interested_list = []
         for s in services:
-            if await s.is_interested_in_event(event, store=self.store):
+            if await s.is_interested_in_event(event, self.store):
                 interested_list.append(s)
 
         return interested_list