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

Commit a8580c5

Browse files
Remove unused store method get_hosts_in_room (#7448)
1 parent 5cf758c commit a8580c5

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

changelog.d/7448.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove storage method `get_hosts_in_room` that is no longer called anywhere.

synapse/storage/data_stores/main/roommember.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,6 @@ def _check_safe_current_state_events_membership_updated_txn(self, txn):
153153
self._check_safe_current_state_events_membership_updated_txn,
154154
)
155155

156-
@cachedInlineCallbacks(max_entries=100000, iterable=True, cache_context=True)
157-
def get_hosts_in_room(self, room_id, cache_context):
158-
"""Returns the set of all hosts currently in the room
159-
"""
160-
user_ids = yield self.get_users_in_room(
161-
room_id, on_invalidate=cache_context.invalidate
162-
)
163-
hosts = frozenset(get_domain_from_id(user_id) for user_id in user_ids)
164-
return hosts
165-
166156
@cached(max_entries=100000, iterable=True)
167157
def get_users_in_room(self, room_id):
168158
return self.db.runInteraction(

0 commit comments

Comments
 (0)