summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-11 16:58:53 +0000
committerErik Johnston <erik@matrix.org>2014-11-11 16:58:53 +0000
commit3db2c0d43e6859e522859be271e5d361053f22b4 (patch)
tree4e7c415579b3d11b6bdc9f8a910b1ff4da7c1a3a /synapse
parentMerge pull request #12 from matrix-org/federation_authorization (diff)
downloadsynapse-3db2c0d43e6859e522859be271e5d361053f22b4.tar.xz
Rename annotate_state_groups to annotate_event_with_state
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/_base.py2
-rw-r--r--synapse/handlers/federation.py14
-rw-r--r--synapse/state.py2
3 files changed, 9 insertions, 9 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 07a8464107..30c6733063 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -64,7 +64,7 @@ class BaseHandler(object):
 
         snapshot.fill_out_prev_events(event)
 
-        yield self.state_handler.annotate_state_groups(event)
+        yield self.state_handler.annotate_event_with_state(event)
 
         yield self.auth.add_auth_events(event)
 
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index c2cd91bb39..d8d5730b65 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -111,7 +111,7 @@ class FederationHandler(BaseHandler):
         if state:
             state = [self.pdu_codec.event_from_pdu(p) for p in state]
 
-        is_new_state = yield self.state_handler.annotate_state_groups(
+        is_new_state = yield self.state_handler.annotate_event_with_state(
             event,
             old_state=state
         )
@@ -202,7 +202,7 @@ class FederationHandler(BaseHandler):
             event = self.pdu_codec.event_from_pdu(pdu)
 
             # FIXME (erikj): Not sure this actually works :/
-            yield self.state_handler.annotate_state_groups(event)
+            yield self.state_handler.annotate_event_with_state(event)
 
             events.append(event)
 
@@ -268,7 +268,7 @@ class FederationHandler(BaseHandler):
 
             logger.debug("do_invite_join state: %s", state)
 
-            is_new_state = yield self.state_handler.annotate_state_groups(
+            is_new_state = yield self.state_handler.annotate_event_with_state(
                 event,
                 old_state=state
             )
@@ -289,7 +289,7 @@ class FederationHandler(BaseHandler):
                 # FIXME: Auth these.
                 e.outlier = True
 
-                yield self.state_handler.annotate_state_groups(
+                yield self.state_handler.annotate_event_with_state(
                     e,
                 )
 
@@ -330,7 +330,7 @@ class FederationHandler(BaseHandler):
         snapshot = yield self.store.snapshot_room(event)
         snapshot.fill_out_prev_events(event)
 
-        yield self.state_handler.annotate_state_groups(event)
+        yield self.state_handler.annotate_event_with_state(event)
         yield self.auth.add_auth_events(event)
         self.auth.check(event, raises=True)
 
@@ -345,7 +345,7 @@ class FederationHandler(BaseHandler):
 
         event.outlier = False
 
-        is_new_state = yield self.state_handler.annotate_state_groups(event)
+        is_new_state = yield self.state_handler.annotate_event_with_state(event)
         self.auth.check(event, raises=True)
 
         # FIXME (erikj):  All this is duplicated above :(
@@ -421,7 +421,7 @@ class FederationHandler(BaseHandler):
             )
         )
 
-        yield self.state_handler.annotate_state_groups(event)
+        yield self.state_handler.annotate_event_with_state(event)
 
         yield self.store.persist_event(
             event,
diff --git a/synapse/state.py b/synapse/state.py
index 11c54fd38c..9c22cf7701 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -45,7 +45,7 @@ class StateHandler(object):
 
     @defer.inlineCallbacks
     @log_function
-    def annotate_state_groups(self, event, old_state=None):
+    def annotate_event_with_state(self, event, old_state=None):
         yield run_on_reactor()
 
         if old_state: