summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/plugin_e2ee.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py
index 90222313..da6aec9a 100644
--- a/poezio/plugin_e2ee.py
+++ b/poezio/plugin_e2ee.py
@@ -231,7 +231,7 @@ class E2EEPlugin(BasePlugin):
def _toggle_tab(self, _input: str) -> None:
jid = self.api.current_tab().jid # type: JID
- if self._enabled_tabs.get(jid) == self.encrypt:
+ if self._encryption_enabled(jid):
del self._enabled_tabs[jid]
config.remove_and_save('encryption', section=jid)
self.api.information(
@@ -311,7 +311,7 @@ class E2EEPlugin(BasePlugin):
self.store_trust(jid, state, fpr)
def _encryption_enabled(self, jid: JID) -> bool:
- return jid in self._enabled_tabs and self._enabled_tabs[jid] == self.encrypt
+ return self._enabled_tabs.get(jid) == self.encrypt
async def _encrypt_wrapper(self, stanza: StanzaBase) -> Optional[StanzaBase]:
"""