mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-08 14:18:08 -05:00
client: Skip unknown rooms while decrypting.
This fixes a crash but the real reason why the room is unknown for pantalaimons client is if the other sync stream is ahead of pantalaimons. This will end up in undecryptable messages unless the client waits for pantalaimon to finish its own sync. This closes #11.
This commit is contained in:
parent
e2da496f93
commit
d36d2107a9
@ -119,10 +119,14 @@ class PantaClient(AsyncClient):
|
||||
Returns the json response with decrypted events.
|
||||
"""
|
||||
for room_id, room_dict in body["rooms"]["join"].items():
|
||||
if not self.rooms[room_id].encrypted:
|
||||
logger.info("Room {} is not encrypted skipping...".format(
|
||||
self.rooms[room_id].display_name
|
||||
))
|
||||
try:
|
||||
if not self.rooms[room_id].encrypted:
|
||||
logger.info("Room {} is not encrypted skipping...".format(
|
||||
self.rooms[room_id].display_name
|
||||
))
|
||||
continue
|
||||
except KeyError:
|
||||
logger.info("Unknown room {} skipping...".format(room_id))
|
||||
continue
|
||||
|
||||
for event in room_dict["timeline"]["events"]:
|
||||
|
Loading…
Reference in New Issue
Block a user