Skip to content

Commit

Permalink
Remove some unnecessary variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 22, 2022
1 parent 9c5b890 commit b35801d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mautrix/bridge/e2ee.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ class EncryptionManager:
state_store: StateStore

min_send_trust: TrustState
min_share_trust: TrustState
min_receive_trust: TrustState
key_sharing_enabled: bool

bridge: br.Bridge
Expand Down Expand Up @@ -106,11 +104,9 @@ def __init__(
self.client.add_event_handler(InternalEventType.SYNC_STOPPED, self._exit_on_sync_fail)
self.crypto.allow_key_share = self.allow_key_share
verification_levels = bridge.config["bridge.encryption.verification_levels"]
self.min_share_trust = TrustState.parse(verification_levels["share"])
self.min_send_trust = TrustState.parse(verification_levels["send"])
self.min_receive_trust = TrustState.parse(verification_levels["receive"])
self.crypto.share_keys_min_trust = self.min_share_trust
self.crypto.send_keys_min_trust = self.min_receive_trust
self.crypto.share_keys_min_trust = TrustState.parse(verification_levels["share"])
self.crypto.send_keys_min_trust = TrustState.parse(verification_levels["receive"])
self.key_sharing_enabled = bridge.config["bridge.encryption.allow_key_sharing"]

async def _exit_on_sync_fail(self, data) -> None:
Expand Down

0 comments on commit b35801d

Please sign in to comment.