소스 검색

portal.handle_matrix_message: fix error when no exceptions

Sumner Evans 3 년 전
부모
커밋
9882785e3b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      mautrix_signal/portal.py

+ 1 - 1
mautrix_signal/portal.py

@@ -295,7 +295,7 @@ class Portal(DBPortal, BasePortal):
             auth_failed = (
                 "org.whispersystems.signalservice.api.push.exceptions.AuthorizationFailedException"
             )
-            if isinstance(e, ResponseError) and auth_failed in e.data.get("exceptions"):
+            if isinstance(e, ResponseError) and auth_failed in e.data.get("exceptions", []):
                 await sender.push_bridge_state(BridgeStateEvent.BAD_CREDENTIALS, error=str(e))
             await self._send_message(
                 self.main_intent,