Correct pathname to OMEMO file.

This commit is contained in:
Schimon Jehudah, Adv. 2024-09-12 16:38:12 +03:00
parent f3f58244e8
commit 95dd1f82e4

View file

@ -26,6 +26,8 @@ TODO
import json import json
from omemo.storage import Just, Maybe, Nothing, Storage from omemo.storage import Just, Maybe, Nothing, Storage
from omemo.types import DeviceInformation, JSONType from omemo.types import DeviceInformation, JSONType
import os
from slixfeed.config import Data
from slixfeed.log import Logger from slixfeed.log import Logger
from slixmpp import JID from slixmpp import JID
from slixmpp.exceptions import IqTimeout, IqError from slixmpp.exceptions import IqTimeout, IqError
@ -252,7 +254,8 @@ class StorageImpl(Storage):
Example storage implementation that stores all data in a single JSON file. Example storage implementation that stores all data in a single JSON file.
""" """
JSON_FILE = "/home/admin/omemo-echo-client.json" omemo_dir = Data.get_pathname_to_omemo_directory()
JSON_FILE = os.path.join(omemo_dir, 'omemo.json')
def __init__(self) -> None: def __init__(self) -> None:
super().__init__() super().__init__()
@ -310,7 +313,8 @@ class XEP_0384Impl(XEP_0384): # pylint: disable=invalid-name
blindly_trusted: FrozenSet[DeviceInformation], blindly_trusted: FrozenSet[DeviceInformation],
identifier: Optional[str] identifier: Optional[str]
) -> None: ) -> None:
log.info(f"[{identifier}] Devices trusted blindly: {blindly_trusted}") print(f"[{identifier}] Devices trusted blindly: {blindly_trusted}")
#log.info(f"[{identifier}] Devices trusted blindly: {blindly_trusted}")
async def _prompt_manual_trust( async def _prompt_manual_trust(
self, self,