2 Commits

Author SHA1 Message Date
c4024b2534 WIP Encrypt outgoing emails when possible
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-08 11:36:37 +02:00
3ee76e26ab Re-import user's pubkey on access
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Sometimes, the pubkey might not be imported in the local keychain
(anymore), but at this point in the code it had been successfully
imported at least once before. So we just (re-)import every time for it
to never fail.
2024-10-08 11:34:18 +02:00

View File

@@ -174,6 +174,7 @@ class User < ApplicationRecord
def gnupg_key
return nil unless pgp_pubkey.present?
GPGME::Key.import(pgp_pubkey)
GPGME::Key.get(pgp_fpr)
end