From 9b7b0d98cb9a41e8bd06ae627474d4e1e97139e6 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 7 Jun 2026 21:52:00 +0200 Subject: OpenPGP: Process signatures on presences only once needed - Incoming signatures are stored in the database and processed when needed (to send PGP encrypted messages or to display them in the contact details) - Outgoing signatures are stored in the database and cached until the key is changed --- plugins/openpgp/src/plugin.vala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/openpgp/src/plugin.vala') diff --git a/plugins/openpgp/src/plugin.vala b/plugins/openpgp/src/plugin.vala index 463058f3..32542c21 100644 --- a/plugins/openpgp/src/plugin.vala +++ b/plugins/openpgp/src/plugin.vala @@ -37,7 +37,13 @@ public class Plugin : Plugins.RootInterface, Object { public void shutdown() { } private void on_initialize_account_modules(Account account, ArrayList modules) { - Module module = new Module(db.get_account_key(account)); + string signed_data = ""; + string? sig = db.get_account_signature(account, signed_data); + bool sig_was_unknown = sig == null; + Module module = new Module(db.get_account_key(account), ref signed_data, ref sig); + if (sig_was_unknown && sig != null) { + db.set_account_signature(account, signed_data, sig); + } this.modules[account] = module; modules.add(module); } -- cgit v1.3