This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

archiver-bot: fix MegolmEvent attr crash, propagate sync errors

MegolmEvent has no `.message` attribute (the real field is `.ciphertext`),
so the on_megolm callback added in 54d7388 raised AttributeError on the
first undecryptable event and took the bot down. Drop the field from the
log line — sender + session_id are enough.

Also re-raise after logging in the sync_forever wrapper so the process
exits non-zero and systemd's Restart=on-failure actually triggers; the
swallowed exception was why the bot stayed dead for 5 days instead of
restarting.

+2 -1
+2 -1
5pkgs/archiver-bot/archiver_bot/__init__.py
··· 503 503 """Handle messages we couldn't decrypt.""" 504 504 log.warning( 505 505 f"Failed to decrypt message from {event.sender} in {room.display_name} " 506 - f"(session {event.session_id}): {event.message}" 506 + f"(session {event.session_id})" 507 507 ) 508 508 # Request the keys we're missing 509 509 if client.olm: ··· 700 700 await client.sync_forever(timeout=30000, full_state=True) 701 701 except Exception: 702 702 log.exception("sync_forever crashed") 703 + raise 703 704 finally: 704 705 await runner.cleanup() 705 706 await http.close()