Skip to content

Commit

Permalink
Remove unused store method get_hosts_in_room (matrix-org#7448)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 authored and phil-flex committed Jun 16, 2020
1 parent a4e904d commit 136a254
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions changelog.d/7448.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove storage method `get_hosts_in_room` that is no longer called anywhere.
10 changes: 0 additions & 10 deletions synapse/storage/data_stores/main/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,6 @@ def _check_safe_current_state_events_membership_updated_txn(self, txn):
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(
Expand Down

0 comments on commit 136a254

Please sign in to comment.