Make get_current_token accept a direction parameter, which tells whether the source whether we want a token for going 'forwards' or 'backwards'

This commit is contained in:
Erik Johnston 2015-05-12 10:28:10 +01:00
parent 84e6b4001f
commit 4df11b5039
4 changed files with 26 additions and 8 deletions

View file

@ -577,8 +577,8 @@ class RoomEventSource(object):
defer.returnValue((events, end_key))
def get_current_key(self):
return self.store.get_room_events_max_id()
def get_current_key(self, direction='f'):
return self.store.get_room_events_max_id(direction)
@defer.inlineCallbacks
def get_pagination_rows(self, user, config, key):