diff --git a/synapse/storage/databases/main/appservice.py b/synapse/storage/databases/main/appservice.py index 726f2547dc..0ec18d1baf 100644 --- a/synapse/storage/databases/main/appservice.py +++ b/synapse/storage/databases/main/appservice.py @@ -158,14 +158,14 @@ class ApplicationServiceWorkerStore(RoomMemberWorkerStore): cache_context: _CacheContext, ) -> List[str]: """ - Get all users in a room that the appservice controls. + Get all users in a room that the appservice is interested in. Args: room_id: The room to check in. - app_service: The application service to check interest/control against + app_service: The application service to check interest against Returns: - List of user IDs that the appservice controls. + List of user IDs that the appservice is interested in. """ # We can use `get_local_users_in_room(...)` here because an application # service can only act on behalf of users of the server it's on. diff --git a/tests/handlers/test_appservice.py b/tests/handlers/test_appservice.py index 6a761ac8ef..038736b944 100644 --- a/tests/handlers/test_appservice.py +++ b/tests/handlers/test_appservice.py @@ -391,11 +391,11 @@ class ApplicationServicesHandlerSendEventsTestCase(unittest.HomeserverTestCase): # Mock the ApplicationServiceScheduler's _TransactionController's send method so that # we can track any outgoing ephemeral events self.send_mock = simple_async_mock() - hs.get_application_service_handler().scheduler.txn_ctrl.send = self.send_mock + hs.get_application_service_handler().scheduler.txn_ctrl.send = self.send_mock # type: ignore[assignment] # Mock out application services, and allow defining our own in tests self._services: List[ApplicationService] = [] - self.hs.get_datastores().main.get_app_services = Mock( + self.hs.get_datastores().main.get_app_services = Mock( # type: ignore[assignment] return_value=self._services )