mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-07-09 08:09:29 -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)
|
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:
|
try:
|
||||||
if not self.rooms[room_id].encrypted:
|
if not self.rooms[room_id].encrypted:
|
||||||
logger.info(
|
logger.info(
|
||||||
|
@ -920,7 +920,7 @@ class PanClient(AsyncClient):
|
||||||
# pan sync stream did. Let's assume that the room is encrypted.
|
# pan sync stream did. Let's assume that the room is encrypted.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
for event in room_dict["timeline"]["events"]:
|
for event in room_dict.get("timeline", {}).get("events", []):
|
||||||
if "type" not in event:
|
if "type" not in event:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue