From 7fa44a6ff691b2787a8232cb3174e679667c270b Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 5 Apr 2025 14:33:42 +0200 Subject: OMEMO: Use libomemo-c instead of libsignal-protocol-c --- plugins/omemo/src/plugin.vala | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/omemo/src/plugin.vala') diff --git a/plugins/omemo/src/plugin.vala b/plugins/omemo/src/plugin.vala index b6142ba6..7b7034c8 100644 --- a/plugins/omemo/src/plugin.vala +++ b/plugins/omemo/src/plugin.vala @@ -1,5 +1,6 @@ using Gee; using Dino.Entities; +using Omemo; extern const string GETTEXT_PACKAGE; extern const string LOCALE_INSTALL_DIR; @@ -8,8 +9,8 @@ namespace Dino.Plugins.Omemo { public class Plugin : RootInterface, Object { public const bool DEBUG = false; - private static Signal.Context? _context; - public static Signal.Context get_context() { + private static Context? _context; + public static Context get_context() { assert(_context != null); return (!)_context; } @@ -17,11 +18,11 @@ public class Plugin : RootInterface, Object { lock(_context) { try { if (_context == null) { - _context = new Signal.Context(DEBUG); + _context = new Context(DEBUG); } return true; } catch (Error e) { - warning("Error initializing Signal Context %s", e.message); + warning("Error initializing libomemo-c Context %s", e.message); return false; } } @@ -54,11 +55,11 @@ public class Plugin : RootInterface, Object { this.app.plugin_registry.register_call_entryption_entry(DtlsSrtpVerificationDraft.NS_URI, new CallEncryptionEntry(db)); this.app.stream_interactor.module_manager.initialize_account_modules.connect((account, list) => { - Signal.Store signal_store = Plugin.get_context().create_store(); - list.add(new StreamModule(signal_store)); - decryptors[account] = new OmemoDecryptor(account, app.stream_interactor, trust_manager, db, signal_store); + Store store = Plugin.get_context().create_store(); + list.add(new StreamModule(store)); + decryptors[account] = new OmemoDecryptor(account, app.stream_interactor, trust_manager, db, store); list.add(decryptors[account]); - encryptors[account] = new OmemoEncryptor(account, trust_manager,signal_store); + encryptors[account] = new OmemoEncryptor(account, trust_manager, store); list.add(encryptors[account]); list.add(new JetOmemo.Module()); list.add(new DtlsSrtpVerificationDraft.StreamModule()); -- cgit v1.3