mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-17 12:33:52 +01:00
Fix tests
This commit is contained in:
parent
4abcff0177
commit
f091061711
2 changed files with 3 additions and 2 deletions
|
@ -130,7 +130,7 @@ class UserDirectoyHandler(object):
|
||||||
def _handle_intial_room(self, room_id):
|
def _handle_intial_room(self, room_id):
|
||||||
"""Called when we initially fill out user_directory one room at a time
|
"""Called when we initially fill out user_directory one room at a time
|
||||||
"""
|
"""
|
||||||
is_in_room = yield self.store.get_is_host_in_room(room_id, self.server_name)
|
is_in_room = yield self.state.get_is_host_in_room(room_id, self.server_name)
|
||||||
if not is_in_room:
|
if not is_in_room:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ class UserDirectoyHandler(object):
|
||||||
if not change:
|
if not change:
|
||||||
# Need to check if the server left the room entirely, if so
|
# Need to check if the server left the room entirely, if so
|
||||||
# we might need to remove all the users in that room
|
# we might need to remove all the users in that room
|
||||||
is_in_room = yield self.store.get_is_host_in_room(
|
is_in_room = yield self.state.get_is_host_in_room(
|
||||||
room_id, self.server_name,
|
room_id, self.server_name,
|
||||||
)
|
)
|
||||||
if not is_in_room:
|
if not is_in_room:
|
||||||
|
|
|
@ -221,6 +221,7 @@ class UserDirectoryStore(SQLBaseStore):
|
||||||
txn.execute(sql, (prev_stream_id,))
|
txn.execute(sql, (prev_stream_id,))
|
||||||
|
|
||||||
total = 0
|
total = 0
|
||||||
|
max_stream_id = prev_stream_id
|
||||||
for max_stream_id, count in txn:
|
for max_stream_id, count in txn:
|
||||||
total += count
|
total += count
|
||||||
if total > 50:
|
if total > 50:
|
||||||
|
|
Loading…
Reference in a new issue