Move RoomContextHandler out of Handlers

This is in preparation for moving GET /context/ to a worker
This commit is contained in:
Erik Johnston 2018-07-18 15:29:45 +01:00
parent 8cb8df55e9
commit bacdf0cbf9
4 changed files with 12 additions and 6 deletions

View file

@ -395,7 +395,11 @@ class RoomCreationHandler(BaseHandler):
)
class RoomContextHandler(BaseHandler):
class RoomContextHandler(object):
def __init__(self, hs):
self.hs = hs
self.store = hs.get_datastore()
@defer.inlineCallbacks
def get_event_context(self, user, room_id, event_id, limit):
"""Retrieves events, pagination tokens and state around a given event