diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-31 16:17:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-31 16:17:53 +0100 |
commit | dfe0cd71b61c043592cc27b64725918aa5c64724 (patch) | |
tree | ec416471ef0ef54e0f959a9618a07e6ba9ccb64c /synapse/handlers/events.py | |
parent | Expose some homeserver functionality to spam checkers (#6259) (diff) | |
parent | Apply suggestions from code review (diff) | |
download | synapse-dfe0cd71b61c043592cc27b64725918aa5c64724.tar.xz |
Merge pull request #6294 from matrix-org/erikj/add_state_storage
Add StateGroupStorage interface
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r-- | synapse/handlers/events.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py index 5e748687e3..45fe13c62f 100644 --- a/synapse/handlers/events.py +++ b/synapse/handlers/events.py @@ -147,6 +147,10 @@ class EventStreamHandler(BaseHandler): class EventHandler(BaseHandler): + def __init__(self, hs): + super(EventHandler, self).__init__(hs) + self.storage = hs.get_storage() + @defer.inlineCallbacks def get_event(self, user, room_id, event_id): """Retrieve a single specified event. @@ -172,7 +176,7 @@ class EventHandler(BaseHandler): is_peeking = user.to_string() not in users filtered = yield filter_events_for_client( - self.store, user.to_string(), [event], is_peeking=is_peeking + self.storage, user.to_string(), [event], is_peeking=is_peeking ) if not filtered: |