1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index de4d23bbb3..cd6c35f194 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -44,9 +44,17 @@ class BaseHandler(object):
@defer.inlineCallbacks
def _on_new_room_event(self, event, snapshot, extra_destinations=[],
- extra_users=[]):
+ extra_users=[], suppress_auth=False):
snapshot.fill_out_prev_events(event)
+ yield self.state_handler.annotate_state_groups(event)
+
+ if not suppress_auth:
+ yield self.auth.check(event, snapshot, raises=True)
+
+ if hasattr(event, "state_key"):
+ yield self.state_handler.handle_new_event(event, snapshot)
+
yield self.store.persist_event(event)
destinations = set(extra_destinations)
|