mirror of
https://github.com/element-hq/synapse
synced 2024-09-12 09:25:11 +00:00
Clarify interested/control and lints
This commit is contained in:
parent
76435c7915
commit
4451998d38
2 changed files with 5 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue