mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -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
|
@ -182,17 +182,6 @@ class StateHandler(object):
|
|||
joined_hosts = yield self.store.get_joined_hosts(room_id, entry)
|
||||
defer.returnValue(joined_hosts)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_is_host_in_room(self, room_id, host, latest_event_ids=None):
|
||||
if not latest_event_ids:
|
||||
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
||||
logger.debug("calling resolve_state_groups from get_is_host_in_room")
|
||||
entry = yield self.resolve_state_groups(room_id, latest_event_ids)
|
||||
is_host_joined = yield self.store.is_host_joined(
|
||||
room_id, host, entry.state_id, entry.state
|
||||
)
|
||||
defer.returnValue(is_host_joined)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def compute_event_context(self, event, old_state=None):
|
||||
"""Build an EventContext structure for the event.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue