diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-23 17:25:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-10-30 14:46:54 +0000 |
commit | 69f0054ce675bd9d35104c39af9fae9a908b7f33 (patch) | |
tree | 40dc037ff3bd919937cc5cb2deba317d3df40421 /synapse/handlers/events.py | |
parent | Add StateGroupStorage interface (diff) | |
download | synapse-69f0054ce675bd9d35104c39af9fae9a908b7f33.tar.xz |
Port to use state storage
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: |