mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-07-02 02:16:45 -04:00
patch KeyError on sync
This commit is contained in:
parent
a7286dfc9f
commit
95bf217657
1 changed files with 2 additions and 2 deletions
|
@ -905,7 +905,7 @@ class PanClient(AsyncClient):
|
|||
|
||||
self.handle_to_device_from_sync_body(body)
|
||||
|
||||
for room_id, room_dict in body["rooms"]["join"].items():
|
||||
for room_id, room_dict in body.get("rooms", {}).get("join", {}).items():
|
||||
try:
|
||||
if not self.rooms[room_id].encrypted:
|
||||
logger.info(
|
||||
|
@ -920,7 +920,7 @@ class PanClient(AsyncClient):
|
|||
# pan sync stream did. Let's assume that the room is encrypted.
|
||||
pass
|
||||
|
||||
for event in room_dict["timeline"]["events"]:
|
||||
for event in room_dict.get("timeline", {}).get("events", []):
|
||||
if "type" not in event:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue