Implement and use new batched get missing pdu

This commit is contained in:
Erik Johnston 2015-02-23 13:58:02 +00:00
parent 0ac2a79faa
commit db215b7e00
6 changed files with 143 additions and 99 deletions

View file

@ -219,3 +219,22 @@ class TransportLayerClient(object):
)
defer.returnValue(content)
@defer.inlineCallbacks
@log_function
def get_missing_events(self, destination, room_id, earliest_events,
latest_events, limit, min_depth):
path = PREFIX + "/get_missing_events/%s" % (room_id,)
content = yield self.client.post_json(
destination=destination,
path=path,
data={
"limit": int(limit),
"min_depth": int(min_depth),
"earliest_events": earliest_events,
"latest_events": latest_events,
}
)
defer.returnValue(content)