From e9d166c0a10987ababe2e1f24c65ad6a209e4370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 21 Aug 2022 21:17:10 +0200 Subject: [PATCH] Add support for roezio / importing xdg value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- ChangeLog | 1 + poezio_omemo/__init__.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee1d4c5..2ed02e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Version 0.7.0: xxxx-xx-xx Maxime “pep” Buquet * Changes: - Add own-key support to fingerprint method. Requires Poezio 237fd74. + - Add support for roezio (Rust re-impl.). Version 0.6.0: 2022-04-03 Maxime “pep” Buquet diff --git a/poezio_omemo/__init__.py b/poezio_omemo/__init__.py index c70931f..7f623e0 100644 --- a/poezio_omemo/__init__.py +++ b/poezio_omemo/__init__.py @@ -20,10 +20,15 @@ from typing import Dict, List, Optional, Tuple from poezio import colors from poezio.plugin_e2ee import E2EEPlugin -from poezio.xdg import DATA_HOME from poezio.theming import Theme, dump_tuple from poezio.tabs import ChatTab, DynamicConversationTab, StaticConversationTab, MucTab +try: + from poezio.xdg import DATA_HOME +except ImportError: + from poezio.libpoezio import XDG + DATA_HOME = XDG.data_dir + from omemo.exceptions import MissingBundleException from slixmpp import JID from slixmpp.stanza import Message