Skip to content

Commit 479879a

Browse files
committed
Add is_pgp_contact to JSON-RPC
1 parent f6bf6f6 commit 479879a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

deltachat-jsonrpc/src/api/types/contact.rs

+11
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ pub struct ContactObject {
1919
profile_image: Option<String>, // BLOBS
2020
name_and_addr: String,
2121
is_blocked: bool,
22+
23+
/// Is the contact a PGP contact.
24+
is_pgp_contact: bool,
25+
26+
/// Is encryption available for this contact.
27+
///
28+
/// This can only be true of PGP-contacts.
29+
/// However, it is possible to have a PGP-contact
30+
/// for which encryption is not available because we don't have a key yet,
31+
/// e.g. if we just scanned the fingerprint from a QR code.
2232
e2ee_avail: bool,
2333

2434
/// True if the contact can be added to verified groups.
@@ -80,6 +90,7 @@ impl ContactObject {
8090
profile_image, //BLOBS
8191
name_and_addr: contact.get_name_n_addr(),
8292
is_blocked: contact.is_blocked(),
93+
is_pgp_contact: contact.is_pgp_contact(),
8394
e2ee_avail: contact.e2ee_avail(context).await?,
8495
is_verified,
8596
is_profile_verified,

0 commit comments

Comments
 (0)