deltachat-core-rust
deltachat-core-rust copied to clipboard
PGP contacts
JSON-RPC: reset_contact_encryption API is removed.
In deltachat-rpc-client API Contact.reset_encryption is removed.
"Group tracking plugin" in legacy Python API was removed because it relied on parsing email addresses from system messages with regexps.
Known multi-device (non-)issue: pinning a 1:1 chat from legacy client pins email chat via sync message.
Still missing, not all of this should be fixed before merging but at least CI should pass:
- [x] Return an error when API user tries to add email contact to encrypted chats.
- [x] Same for PGP-contacts, they should not be added to unencrypted chats.
- [x] Fix AEAP tests.
- [x]
Chat-Group-Member-Fprheader. - [x] Ignore Chat-Group-ID if the message is not encrypted+signed.
- [x] Complete Thunderbird tests.
- [x] Tests for 1:1 chat assignment. If we have multiple PGP-contacts with the same email address, can assign outgoing messages without Autocrypt-Gossip to the most recent one or using In-Reply-To or References. If there are no PGP-contacts, the message can go to email contact or trash. EDIT: we have tests for incomplete message assignment, they pass. This is not comprehensive and does not use Message-IDs and References, but tying chat assignment to contact lookup is complicated.
- [x] Migration. Started at https://github.com/chatmail/core/pull/6818
- [x] Do not list email-contacts in the contact list by default. For email contacts maybe add a flag.
- [x] Open issues for Thunderbird:
test_prefer_encrypt_mutual_if_encryptedhas TODOs for assigning to chat by issuer fingerprint. This should also work if the key is attached and no Autocrypt header is sent. ~Signed-only messages should probably go to PGP-chat without a padlock. Fixing this is out of scope of this PR.~ Signed-only messages to to email-contact. If Thunderbird is configured to send Autocrypt header, chatting should work, this is already tested. - [ ] SHA-256 fingerprints (https://github.com/rpgp/rpgp/issues/531, https://github.com/rpgp/rpgp/pull/541). If we can, we should use SHA-256 fingerprints for v4 keys instead of having SHA-1 fingerprints as the primary key. Invite links with SHA-1 should still be supported. Adding a column can be done later and we will likely need two columns anyway with standard fingerprint and SHA-256 to support openpgp4fpr and invite links, but
Chat-Group-Member-Fprformat should be fixed before release.
a way to know if a chat is an encrypted chat is missing, currently there is only "isPgpContact" that can be used to mark contacts/1:1 chat but for unencrypted groups/threads of classic email non-pgp contacts there is no API to recognize such chats and also put the "classic email" marker as for classic email contacts
There is a problem with 1:1 chat assignment. If there is no Autocrypt-Gossip on outgoing message, then to_id gets converted to email contact. If there is also a Chat-Verified header, receive_imf fails with an error like DeltaChat: [accId=1] src/imap.rs:1456: receive_imf error: Non-PGP contact Contact#10 cannot be verified.. and the message does not show up at all. So we should assign by References or In-Reply-To and 1:1 chat before converting to_ids.
With this branch Instant Onboarding with group invite link does not work any more.
At least with desktop when pasting a group invite code in Add Profile => Create Profile => Use other server => Scan Invitation Code BackendRemote.rpc.checkQr(accountId, url) throws an error: "failed to decode https://i.delta.chat/# QR code: failed to add or lookup contact for address ContactAddress("[email protected]"): No self addr configured"
Scanning the invite code with an existing user works fine.
@Hocuri @link2xt
/me accidentally added and removed a commit here to fix "golden test", i wanted to add that to https://github.com/chatmail/core/pull/6938 only ...