1 parent
0421994fe6
commit
425ea7449b
138 files changed
+5705
-1012
No files matched your search
+6
-7
@@ -441,10 +441,10 @@ fn resolve_sender_public_key(
|
||||
identity: Option<&crate::db::identities::Identity>,
|
||||
sender_email: &str,
|
||||
) -> Result<(String, String), AppError> {
|
||||
if let Some(fingerprint) = identity.and_then(|item| item.pgp_fingerprint.as_deref()) {
|
||||
if let Some(key) = db::pgp::get_key(conn, fingerprint).map_err(AppError::InternalError)? {
|
||||
return Ok((key.record.key_id, key.record.public_key_armor));
|
||||
}
|
||||
if let Some(fingerprint) = identity.and_then(|item| item.pgp_fingerprint.as_deref())
|
||||
&& let Some(key) = db::pgp::get_key(conn, fingerprint).map_err(AppError::InternalError)?
|
||||
{
|
||||
return Ok((key.record.key_id, key.record.public_key_armor));
|
||||
}
|
||||
let key = db::pgp::find_key_internal_by_email(conn, sender_email)
|
||||
.map_err(AppError::InternalError)?
|
||||
@@ -555,10 +555,9 @@ fn build_pgp_send_config(
|
||||
|
||||
if let Some(key) = db::pgp::find_key_internal_by_email(conn, sender_email)
|
||||
.map_err(AppError::InternalError)?
|
||||
&& seen.insert(key.record.fingerprint.clone())
|
||||
{
|
||||
if seen.insert(key.record.fingerprint.clone()) {
|
||||
recipient_public_keys.push(key.record.public_key_armor);
|
||||
}
|
||||
recipient_public_keys.push(key.record.public_key_armor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user