Begin making auth use event.old_state_events

This commit is contained in:
Erik Johnston 2014-10-15 16:06:59 +01:00
parent 80472ac198
commit e7bc1291a0
10 changed files with 115 additions and 83 deletions

View file

@ -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)