diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index c28bfff0f4..a1d328cd29 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -183,12 +183,12 @@ class ApplicationService: # `store.get_app_service_users_in_room` was used in more places besides # an experimental MSC. But for now we can avoid doing more work and # barely using it later. - member_list = await store.get_local_users_in_room( + local_user_ids = await store.get_local_users_in_room( room_id, on_invalidate=cache_context.invalidate ) # check joined member events - for user_id in member_list: + for user_id in local_user_ids: if self.is_interested_in_user(user_id): return True return False diff --git a/synapse/storage/databases/main/appservice.py b/synapse/storage/databases/main/appservice.py index 26fd4fa31a..726f2547dc 100644 --- a/synapse/storage/databases/main/appservice.py +++ b/synapse/storage/databases/main/appservice.py @@ -169,10 +169,10 @@ class ApplicationServiceWorkerStore(RoomMemberWorkerStore): """ # 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. - users_in_room = await self.get_local_users_in_room( + local_users_in_room = await self.get_local_users_in_room( room_id, on_invalidate=cache_context.invalidate ) - return list(filter(app_service.is_interested_in_user, users_in_room)) + return list(filter(app_service.is_interested_in_user, local_users_in_room)) class ApplicationServiceStore(ApplicationServiceWorkerStore):