diff options
author | Erik Johnston <erik@matrix.org> | 2017-06-09 10:52:26 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-06-09 10:52:26 +0100 |
commit | 0185b75381c160edaf2bec0b9f4def0bb0d67a02 (patch) | |
tree | 55e8ba309e5736457b3c187974d2eb6f33049803 /synapse/state.py | |
parent | Merge pull request #2263 from matrix-org/erikj/fix_state_woes (diff) | |
download | synapse-0185b75381c160edaf2bec0b9f4def0bb0d67a02.tar.xz |
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)
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/synapse/state.py b/synapse/state.py index 576eb6b788..5b386e3183 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -183,17 +183,6 @@ class StateHandler(object): 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. |