|
46 | 46 | ProfileInfo,
|
47 | 47 | RoomsForUser,
|
48 | 48 | )
|
49 |
| -from synapse.types import PersistedEventPosition, StateMap, get_domain_from_id |
| 49 | +from synapse.types import PersistedEventPosition, get_domain_from_id |
50 | 50 | from synapse.util.async_helpers import Linearizer
|
51 | 51 | from synapse.util.caches import intern_string
|
52 | 52 | from synapse.util.caches.descriptors import _CacheContext, cached, cachedList
|
@@ -273,7 +273,7 @@ def _get_room_summary_txn(txn):
|
273 | 273 | txn.execute(sql, (room_id,))
|
274 | 274 | res = {}
|
275 | 275 | for count, membership in txn:
|
276 |
| - summary = res.setdefault(membership, MemberSummary([], count)) |
| 276 | + res.setdefault(membership, MemberSummary([], count)) |
277 | 277 |
|
278 | 278 | # we order by membership and then fairly arbitrarily by event_id so
|
279 | 279 | # heroes are consistent
|
@@ -839,18 +839,14 @@ async def get_joined_hosts(self, room_id: str, state_entry):
|
839 | 839 |
|
840 | 840 | with Measure(self._clock, "get_joined_hosts"):
|
841 | 841 | return await self._get_joined_hosts(
|
842 |
| - room_id, state_group, state_entry.state, state_entry=state_entry |
| 842 | + room_id, state_group, state_entry=state_entry |
843 | 843 | )
|
844 | 844 |
|
845 | 845 | @cached(num_args=2, max_entries=10000, iterable=True)
|
846 | 846 | async def _get_joined_hosts(
|
847 |
| - self, |
848 |
| - room_id: str, |
849 |
| - state_group: int, |
850 |
| - current_state_ids: StateMap[str], |
851 |
| - state_entry: "_StateCacheEntry", |
| 847 | + self, room_id: str, state_group: int, state_entry: "_StateCacheEntry" |
852 | 848 | ) -> FrozenSet[str]:
|
853 |
| - # We don't use `state_group`, its there so that we can cache based on |
| 849 | + # We don't use `state_group`, it's there so that we can cache based on |
854 | 850 | # it. However, its important that its never None, since two
|
855 | 851 | # current_state's with a state_group of None are likely to be different.
|
856 | 852 | #
|
|
0 commit comments