summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-06-07 11:05:23 +0100
committerErik Johnston <erik@matrix.org>2017-06-07 11:05:23 +0100
commit09e4bc05016a37f70111c4e54df10c9f070e8ba4 (patch)
treee5cc39f79c3d855716c859c3e71969ae704a2054 /synapse/state.py
parentRemove spurious log lines (diff)
parentIncrease size of IP cache (diff)
downloadsynapse-09e4bc05016a37f70111c4e54df10c9f070e8ba4.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_fixup
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py
index d1b1a70a91..a98145598f 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -183,6 +183,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.