Get the end token even if there weren't any messages.

This commit is contained in:
poljar (Damir Jelić) 2018-02-22 14:10:47 +01:00
parent 0c54c5f1b4
commit 26f38a5193

View file

@ -315,11 +315,11 @@ class MatrixBacklogEvent(MatrixEvent):
@classmethod
def from_dict(cls, server, room_id, parsed_dict):
try:
if not parsed_dict["chunk"]:
return cls(server, room_id, None, [])
end_token = sanitize_id(parsed_dict["end"])
if not parsed_dict["chunk"]:
return cls(server, room_id, end_token, [])
message_func = partial(MatrixBacklogEvent._message_from_event,
room_id)