0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-03 03:09:02 +02:00

Remove unused store method get_hosts_in_room (#7448)

This commit is contained in:
Andrew Morgan 2020-05-11 16:55:57 +01:00 committed by GitHub
parent 5cf758cdd6
commit a8580c5f19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 10 deletions

1
changelog.d/7448.misc Normal file
View file

@ -0,0 +1 @@
Remove storage method `get_hosts_in_room` that is no longer called anywhere.

View file

@ -153,16 +153,6 @@ class RoomMemberWorkerStore(EventsWorkerStore):
self._check_safe_current_state_events_membership_updated_txn,
)
@cachedInlineCallbacks(max_entries=100000, iterable=True, cache_context=True)
def get_hosts_in_room(self, room_id, cache_context):
"""Returns the set of all hosts currently in the room
"""
user_ids = yield self.get_users_in_room(
room_id, on_invalidate=cache_context.invalidate
)
hosts = frozenset(get_domain_from_id(user_id) for user_id in user_ids)
return hosts
@cached(max_entries=100000, iterable=True)
def get_users_in_room(self, room_id):
return self.db.runInteraction(