Commit Graph
3342 Commits
Author SHA1 Message Date
Alexander Krotov efcdb45301 ci: use different target dirs for Python and Rust tests
This prevents CI jobs from locking each other.
2020-09-18 20:42:27 +03:00
bjoern 5742360e3e Merge pull request #1915 from deltachat/resultify-sqy-open
Resultify sql.open()
2020-09-17 23:05:58 +02:00
Hocuri 99a36e8629 rustfmt 2020-09-17 17:29:29 +02:00
Hocuri 6253a2cef7 . 2020-09-17 12:27:57 +02:00
Hocuri aee6eb2261 {:#} once more 2020-09-17 09:39:14 +02:00
Hocuri 6d6ac66f4d Show dbfile when opening fails 2020-09-16 17:24:04 +02:00
Hocuri 4ed2638594 Also show the inner error 2020-09-16 16:02:25 +02:00
Hocuri b892dafa49 Clippy 2020-09-16 15:17:56 +02:00
Hocuri e870b33e03 Revert "Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!"
This reverts commit 27e53ddbff.
2020-09-16 15:05:05 +02:00
Hocuri 27e53ddbff Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!! 2020-09-16 15:00:36 +02:00
Hocuri 396ccebb5c Log more 2020-09-16 15:00:22 +02:00
Hocuri f9cc3cbef0 Resultify sql.open() 2020-09-16 13:45:32 +02:00
Alexander Krotov 0a5d1e5551 sql: create new accounts without migration
This speeds up account creation by ~50% on HDD.
2020-09-15 02:03:58 +03:00
Alexander Krotov 49c8964aec Add benchmark for account creation 2020-09-15 02:03:58 +03:00
bjoern c3f9f473ac Merge pull request #1907 from deltachat/prep-1.46
prepare 1.46
2020-09-13 15:26:32 +02:00
B. Petersen b0d68ce09e bump version to 1.46 1.46.0 2020-09-13 14:35:17 +02:00
B. Petersen 191de6c445 update changelog for 1.46 2020-09-13 14:33:21 +02:00
bjoern 6ebdbe7dd6 Merge pull request #1908 from deltachat/ehlo-127
Update to non-release version of async-smtp
2020-09-13 14:26:50 +02:00
Alexander Krotov b42b1ad99b Make dc_accounts_get_all return accounts sorted
HashMap may rearrange all accounts after each insertion and deletion,
making it unpredictable where the new account appears.
2020-09-13 14:36:59 +03:00
Alexander Krotov b28f5c8716 Update to non-release version of async-smtp
It is one commit ahead 0.3.4, replacing EHLO localhost with EHLO [127.0.0.1].
2020-09-13 13:04:23 +03:00
bjoern 3ce244b048 Merge pull request #1906 from deltachat/imap-progress
configure: add progress! calls during IMAP configuration
2020-09-12 21:37:24 +02:00
Alexander Krotov 53c47bd862 configure: add progress! calls during IMAP configuration 2020-09-12 20:14:58 +03:00
Alexander Krotov d6a0763b1d Teach Python bindings to process (char *)0 2020-09-12 19:42:41 +03:00
Alexander Krotov ecbc83390e Add "Configuration failed" stock string 2020-09-12 19:42:41 +03:00
Alexander Krotov f5b16cf086 Set data2 in ConfigureProgress event
For now it is only set on error, but could contain user-readable log
messages in the future.
2020-09-12 19:42:41 +03:00
Alexander Krotov cdba74a027 configure: add expand_param_vector function 2020-09-12 15:19:45 +03:00
Alexander Krotov a065f654e8 Fix a typo in deltachat.h 2020-09-12 14:14:57 +03:00
Floris Bruynooghe 2a254c51fa Remove the Bob::status field and BobStatus enum
This field is entirely unused.
2020-09-11 18:40:36 +02:00
Floris Bruynooghe 428dbfb537 Resultify join_securejoin
This gets rid of ChatId::new(0) usage and is generally a nice first
refactoing step.  The complexity of cleanup() unravels nicely.
2020-09-11 18:38:51 +02:00
Alexander Krotov b0bb0214c0 Transpose if branches
This removes three ifs and adds two ifs, making it more clear that
nothing is done if there is no Autocrypt header.
2020-09-09 21:46:45 +03:00
Alexander Krotov f7897d5f1a e2ee: add test for encrypted message without Autocrypt header 2020-09-09 21:46:45 +03:00
Alexander Krotov 42c5bbcda3 Do not reset peerstate on encrypted messages
If message does not contain Autocrypt header, but is encrypted, do not
change the peerstate.
2020-09-09 21:46:45 +03:00
Alexander Krotov f657b2950c Split ForcePlaintext param into two booleans
This allows to send encrypted messages without Autocrypt header.
2020-09-09 21:46:45 +03:00
Alexander Krotov 6fcc589655 Use ForcePlaintext as enum, not i32 2020-09-09 21:46:45 +03:00
Floris Bruynooghe a7178f4f25 Hack to fix group chat creation race condition
In the current design the dc_receive_imf() pipeline calls
handle_securejoin_handshake() before it creates the group.  However
handle_securejoin_handshake() already signals to securejoin() that the
chat exists, which is not true.

The proper fix would be to re-desing how group-creation works,
potentially allowinng handle_securejoin_handshake() to already create
the group and no longer require any further processing by
dc_receive_imf().
2020-09-07 18:53:05 +02:00
Floris Bruynooghe ce01e1652f Add happy path test for secure-join 2020-09-07 18:53:05 +02:00
B. Petersen c6339c4ae4 remove python bindings and tests for unused dc_empty_server() 2020-09-07 06:38:48 +03:00
B. Petersen 65f2a3b1c6 remove unused dc_empty_server() and related code
'Delete emails from server' was an experimental ad-hoc function
that was added before 'Automatically delete old messages' was introduced
to allow at least some way to cleanup.

'Delete emails from server'-UI was already removed from android/ios in june
(see https://github.com/deltachat/deltachat-android/pull/1406)
and the function never exists on desktop at all.
2020-09-07 06:38:48 +03:00
B. Petersen 87c6f7d42b remove unused defines from ffi, these parts do not have an implementation since some time 2020-09-07 06:38:48 +03:00
Floris Bruynooghe cd925624a7 Add some initial tests for securejoin
This currently tests the setup-contact full flow and the shortcut
flow.  More securejoin tests are needed but this puts some
infrastructure in place to start writing these.
2020-09-05 22:59:35 +02:00
Alexander Krotov cdd1ccb458 Ignore reordered autocrypt headers
This commit fixes condition which ignores reordered autocrypt messages.
If a plaintext message resetting peerstate has been received, autocrypt
header should only be applied if it has higher timestamp.

Previously, timestamp of the last received autocrypt header was used,
which may be lower than last_seen timestamp.

# Conflicts:
#	src/peerstate.rs
2020-09-05 21:29:54 +03:00
Alexander Krotov e388e4cc1e Do not emit network errors during configuration
Previously DC_EVENT_ERROR_NETWORK events were emitted for each failed
attempt during autoconfiguration, even if eventually configuration
succeeded. Such error reports are not useful and often confusing,
especially if they report failures to connect to domains that don't
exist, such as imap.example.org when mail.example.org should be used.

Now DC_EVENT_ERROR_NETWORK is only emitted when attempting to connect
with existing IMAP and SMTP configuration already stored in the
database.

Configuration failure is still indicated by DC_EVENT_CONFIGURE_PROGRESS
with data1 set to 0. Python tests from TestOnlineConfigurationFails
group are changed to only wait for this event.
2020-09-05 21:17:26 +03:00
Alexander Krotov 9b741825ef Attempt IMAP and SMTP configuration in parallel
SMTP configurations are tested in a separate async task.
2020-09-05 21:09:47 +03:00
Alexander Krotov f4e0c6b5f1 Remove Peerstate::new()
Create and return immutable Peerstate instead.
2020-09-05 21:07:58 +03:00
Alexander Krotov a68528479f Remove dead code markers 2020-09-05 21:07:28 +03:00
Alexander Krotov 383c5ba7fd Smtp.send: join recipients list without .collect 2020-09-05 21:06:32 +03:00
Floris Bruynooghe ee27c7d9d4 Run clippy on tests and examples 2020-09-05 18:13:16 +02:00
bjoern 11b9a933b0 Merge pull request #1881 from deltachat/fix-bottleneck
add an index to significantly speed up get_fresh_msg_cnt()
2020-09-02 23:10:23 +02:00
bjoernandAsiel Díaz Benítez 8d9fa233c5 Update src/chat.rs
Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>
2020-09-02 21:36:12 +02:00
Floris Bruynooghe edcad6f5d5 Use PartialEq on SecureJoinStep 2020-09-02 21:23:16 +02:00