summaryrefslogtreecommitdiff
path: root/poezio/plugin_e2ee.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-14 16:37:01 +0100
committermathieui <mathieui@mathieui.net>2021-04-02 17:44:36 +0200
commit53633a5c4c8097c1cb356e5240be2a925fb8a631 (patch)
treef8fd79048fd19ce1846e28becafbd3b2aa9955b7 /poezio/plugin_e2ee.py
parentb2fbb313ef4b88e62d5d41b5cb5862d643424f73 (diff)
downloadpoezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.tar.gz
poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.tar.bz2
poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.tar.xz
poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.zip
refactor: rewrite config.get() to getbool, getstr, getint…
Diffstat (limited to 'poezio/plugin_e2ee.py')
-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 a0856957..de6a24c0 100644
--- a/poezio/plugin_e2ee.py
+++ b/poezio/plugin_e2ee.py
@@ -204,7 +204,7 @@ class E2EEPlugin(BasePlugin):
def __load_encrypted_states(self) -> None:
"""Load previously stored encryption states for jids."""
for section in config.sections():
- value = config.get('encryption', section=section)
+ value = config.getstr('encryption', section=section)
if value and value == self.encryption_short_name:
self._enabled_tabs[section] = self.encrypt
@@ -496,7 +496,7 @@ class E2EEPlugin(BasePlugin):
def fetch_trust(self, jid: JID, fingerprint: str) -> str:
"""Fetch trust of a fingerprint and a jid."""
option_name = '%s:%s' % (self.encryption_short_name, fingerprint)
- return config.get(option=option_name, section=jid)
+ return config.getstr(option=option_name, section=jid)
async def decrypt(self, message: Message, jid: Optional[JID], tab: ChatTab):
"""Decryption method