summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2018-11-18 11:50:29 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-12-27 18:56:27 +0100
commit2348f3705c400aec330caef5c0f56c27fa5765d7 (patch)
treeeb7b8e2797e6b8840487956467330fa79e011449
parent2ff48b7adf3e022e6809ce59f6429a387f0f3ffa (diff)
downloadpoezio-2348f3705c400aec330caef5c0f56c27fa5765d7.tar.gz
poezio-2348f3705c400aec330caef5c0f56c27fa5765d7.tar.bz2
poezio-2348f3705c400aec330caef5c0f56c27fa5765d7.tar.xz
poezio-2348f3705c400aec330caef5c0f56c27fa5765d7.zip
omemo: Update plugin to using poezio.xdg
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--plugins/omemo_plugin.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/omemo_plugin.py b/plugins/omemo_plugin.py
index fa5dab67..8759957b 100644
--- a/plugins/omemo_plugin.py
+++ b/plugins/omemo_plugin.py
@@ -14,7 +14,7 @@ import asyncio
import textwrap
from poezio.plugin import BasePlugin
from poezio.tabs import ConversationTab
-from poezio.config import CACHE_DIR
+from poezio.xdg import CACHE_HOME
class Plugin(BasePlugin):
@@ -22,13 +22,13 @@ class Plugin(BasePlugin):
self.info = lambda i: self.api.information(i, 'Info')
self.xmpp = self.core.xmpp
- self.info('CACHE_DIR: %r' % CACHE_DIR)
+ cache_dir = os.path.join(CACHE_HOME, 'omemo')
+ os.makedirs(cache_dir, exist_ok=True)
self.xmpp.register_plugin(
'xep_0384', {
- 'cache_dir': os.path.join(CACHE_DIR, 'omemo.sqlite'),
+ 'cache_dir': cache_dir,
})
- self.info('FOO')
self.api.add_command(
'omemo',