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

@ -89,7 +89,9 @@ class MessageHandler(BaseHandler):
if not pagin_config.from_token:
pagin_config.from_token = (
yield self.hs.get_event_sources().get_current_token()
yield self.hs.get_event_sources().get_current_token(
direction='b'
)
)
room_token = RoomStreamToken.parse(pagin_config.from_token.room_key)