Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Clarify interested/control and lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Sep 30, 2022
1 parent 76435c7 commit 4451998
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions synapse/storage/databases/main/appservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ async def get_app_service_users_in_room(
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.
Expand Down
4 changes: 2 additions & 2 deletions tests/handlers/test_appservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer):
# 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
)

Expand Down

0 comments on commit 4451998

Please sign in to comment.