Use get_users_in_room and declare it iterable
This commit is contained in:
parent
9636b2407d
commit
828db669ec
|
@ -203,7 +203,7 @@ class DeviceHandler(BaseHandler):
|
||||||
hosts = set()
|
hosts = set()
|
||||||
if self.hs.is_mine_id(user_id):
|
if self.hs.is_mine_id(user_id):
|
||||||
for room_id in room_ids:
|
for room_id in room_ids:
|
||||||
users = yield self.state.get_current_user_in_room(room_id)
|
users = yield self.store.get_users_in_room(room_id)
|
||||||
hosts.update(get_domain_from_id(u) for u in users)
|
hosts.update(get_domain_from_id(u) for u in users)
|
||||||
hosts.discard(self.server_name)
|
hosts.discard(self.server_name)
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ class RoomMemberStore(SQLBaseStore):
|
||||||
with self._stream_id_gen.get_next() as stream_ordering:
|
with self._stream_id_gen.get_next() as stream_ordering:
|
||||||
yield self.runInteraction("locally_reject_invite", f, stream_ordering)
|
yield self.runInteraction("locally_reject_invite", f, stream_ordering)
|
||||||
|
|
||||||
@cached(max_entries=5000)
|
@cached(max_entries=1000000, iterable=True)
|
||||||
def get_users_in_room(self, room_id):
|
def get_users_in_room(self, room_id):
|
||||||
def f(txn):
|
def f(txn):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue