portal/matrix: improve logging
Co-authored-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
@@ -279,8 +279,8 @@ class PortalMatrix(BasePortal, ABC):
|
|||||||
else:
|
else:
|
||||||
if content.file:
|
if content.file:
|
||||||
if not decrypt_attachment:
|
if not decrypt_attachment:
|
||||||
raise Exception(f"Can't bridge encrypted media event {event_id}: matrix-nio "
|
raise Exception(f"Can't bridge encrypted media event {event_id}: "
|
||||||
"is not installed")
|
"encryption dependencies not installed")
|
||||||
file = await self.main_intent.download_media(content.file.url)
|
file = await self.main_intent.download_media(content.file.url)
|
||||||
file = decrypt_attachment(file, content.file.key.key,
|
file = decrypt_attachment(file, content.file.key.key,
|
||||||
content.file.hashes.get("sha256"), content.file.iv)
|
content.file.hashes.get("sha256"), content.file.iv)
|
||||||
@@ -512,6 +512,7 @@ class PortalMatrix(BasePortal, ABC):
|
|||||||
try:
|
try:
|
||||||
await self._handle_matrix_deletion(deleter, event_id, redaction_event_id)
|
await self._handle_matrix_deletion(deleter, event_id, redaction_event_id)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
self.log.debug(str(e))
|
||||||
await self._send_bridge_error(deleter, e, event_id, EventType.ROOM_REDACTION)
|
await self._send_bridge_error(deleter, e, event_id, EventType.ROOM_REDACTION)
|
||||||
else:
|
else:
|
||||||
deleter.send_remote_checkpoint(
|
deleter.send_remote_checkpoint(
|
||||||
|
|||||||
Reference in New Issue
Block a user