diff options
author | Erik Johnston <erikj@jki.re> | 2017-06-01 15:39:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-01 15:39:32 +0100 |
commit | 87e5e05aeae3f921f17af4d57cfec6e15f104c42 (patch) | |
tree | 45228bb7292a2cabd0a7c89ecaab42f7d33d3569 /synapse/state.py | |
parent | Merge pull request #2251 from matrix-org/erikj/current_state_delta_stream (diff) | |
parent | Fix sqlite (diff) | |
download | synapse-87e5e05aeae3f921f17af4d57cfec6e15f104c42.tar.xz |
Merge pull request #2252 from matrix-org/erikj/user_dir
Add a user directory
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py index 02fee47f39..dffa79e4c9 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -187,6 +187,17 @@ 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. |