summaryrefslogtreecommitdiff
path: root/poezio/plugin_e2ee.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/plugin_e2ee.py')
-rw-r--r--poezio/plugin_e2ee.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py
index 6e0bbc0c..b66a8173 100644
--- a/poezio/plugin_e2ee.py
+++ b/poezio/plugin_e2ee.py
@@ -257,10 +257,12 @@ class E2EEPlugin(BasePlugin):
return ""
def _toggle_tab(self, _input: str) -> None:
- jid: JID = self.api.current_tab().jid
+ tab = self.api.current_tab()
+ jid: JID = tab.jid
if self._encryption_enabled(jid):
del self._enabled_tabs[jid]
+ tab.e2e_encryption = None
config.remove_and_save('encryption', section=jid)
self.api.information(
f'{self.encryption_name} encryption disabled for {jid}',
@@ -268,6 +270,7 @@ class E2EEPlugin(BasePlugin):
)
elif self.encryption_short_name:
self._enabled_tabs[jid] = self.encrypt
+ tab.e2e_encryption = self.encryption_name
config.set_and_save('encryption', self.encryption_short_name, section=jid)
self.api.information(
f'{self.encryption_name} encryption enabled for {jid}',