Get the end token even if there weren't any messages.
This commit is contained in:
parent
0c54c5f1b4
commit
26f38a5193
1 changed files with 3 additions and 3 deletions
|
@ -315,11 +315,11 @@ class MatrixBacklogEvent(MatrixEvent):
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, server, room_id, parsed_dict):
|
def from_dict(cls, server, room_id, parsed_dict):
|
||||||
try:
|
try:
|
||||||
if not parsed_dict["chunk"]:
|
|
||||||
return cls(server, room_id, None, [])
|
|
||||||
|
|
||||||
end_token = sanitize_id(parsed_dict["end"])
|
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,
|
message_func = partial(MatrixBacklogEvent._message_from_event,
|
||||||
room_id)
|
room_id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue