mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:24:54 -04:00
Change is_host_joined to use current_state table
This bypasses a bug where using the state groups to figure out if a host is in a room sometimes errors if the servers isn't in the room. (For example when the server rejected an invite to a remote room)
This commit is contained in:
parent
98bdb4468b
commit
0185b75381
4 changed files with 28 additions and 54 deletions
|
@ -151,7 +151,7 @@ class UserDirectoyHandler(object):
|
|||
def _handle_intial_room(self, room_id):
|
||||
"""Called when we initially fill out user_directory one room at a time
|
||||
"""
|
||||
is_in_room = yield self.state.get_is_host_in_room(room_id, self.server_name)
|
||||
is_in_room = yield self.store.is_host_joined(room_id, self.server_name)
|
||||
if not is_in_room:
|
||||
return
|
||||
|
||||
|
@ -209,7 +209,7 @@ class UserDirectoyHandler(object):
|
|||
if not change:
|
||||
# Need to check if the server left the room entirely, if so
|
||||
# we might need to remove all the users in that room
|
||||
is_in_room = yield self.state.get_is_host_in_room(
|
||||
is_in_room = yield self.store.is_host_joined(
|
||||
room_id, self.server_name,
|
||||
)
|
||||
if not is_in_room:
|
||||
|
@ -346,7 +346,7 @@ class UserDirectoyHandler(object):
|
|||
if not update_user_in_public and not update_user_dir:
|
||||
break
|
||||
|
||||
is_in_room = yield self.state.get_is_host_in_room(
|
||||
is_in_room = yield self.store.is_host_joined(
|
||||
j_room_id, self.server_name,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue