B. Petersen
8617c3d359
target comments of @hpk42, format strum manually as skipped by 'cargo fmt' for some reason
2019-12-02 18:52:07 +01:00
B. Petersen
18e91c480b
add tests for update_device_chats()
2019-12-02 16:33:24 +01:00
B. Petersen
9d2e6e1c31
add update_device_chats()
2019-12-02 16:33:24 +01:00
dignifiedquire
eb02100d68
fix(imap): merge error conversions properly
2019-12-01 21:40:56 +01:00
Alexander Krotov
ee18d60644
cargo fmt
2019-12-01 21:01:03 +01:00
Alexander Krotov
612600278a
Move SQL errors into their own module
2019-12-01 21:01:03 +01:00
holger krekel
ea8adf39c2
address @link2xt comment
2019-12-01 20:50:31 +01:00
holger krekel
f7f61e0f85
move imap errors into imap module
2019-12-01 20:50:31 +01:00
Alexander Krotov
a7bb249070
Move another OAuth2 test from stress.rs to oauth2.rs
2019-12-01 20:46:35 +01:00
björn petersen
dfe7dfcfd3
Merge pull request #935 from deltachat/address_idle_race
...
address last(?) idle race condition heuristically
2019-12-01 19:26:40 +01:00
Alexander Krotov
7223a36a71
SMTP error refactoring
2019-12-01 18:24:26 +01:00
holger krekel
2423d197cd
better logging, changed timeout
2019-12-01 18:12:10 +01:00
holger krekel
2582791501
address #925 heuristically
2019-12-01 18:12:10 +01:00
Alexander Krotov
3a08c92433
Replace u32 with a PeerstateKeyType enum
2019-12-01 17:07:33 +01:00
Alexander Krotov
694d8fd6fb
Move dc_dehtml to dehtml and remove unnecessary is_empty check
2019-12-01 13:37:37 +01:00
Alexander Krotov
d5359fb9ba
Ensure that Peerstate has an address set on the type level
2019-12-01 01:52:54 +01:00
B. Petersen
72c29aca6a
do not create device-chat on skipped messages
2019-12-01 01:38:50 +01:00
B. Petersen
32216a334d
add a test that checks the device-chat is not recreated for messages that won't be added
2019-12-01 01:38:50 +01:00
holger krekel
603d55114b
address @link2xt error comment
2019-11-30 23:53:35 +01:00
holger krekel
9d18db9cae
introduce a select_with_uidvalidity function that helps us during configuration to know about last_seen_uid
2019-11-30 23:53:35 +01:00
holger krekel
d14c6ea202
refine uid_next handling and rename and resultify configure_folder to ensure_configurer_folders
2019-11-30 23:53:35 +01:00
holger krekel
7be5fe925a
revert logic to get last_seen_uid
2019-11-30 23:53:35 +01:00
holger krekel
8f43d7fa34
remove commented errors and fix fmt
2019-11-30 23:53:35 +01:00
holger krekel
b6e9bcee3c
when first looking at a folder, look at "uid_next" as returned from server
...
and otherwise properly fetch the last messages to determine the last seen uid.
also add some tracing.
2019-11-30 23:53:35 +01:00
holger krekel
2dbef704e9
rework select_folder error handling (thanks @flub and @link2xt for helping along)
2019-11-30 23:53:35 +01:00
Floris Bruynooghe
74a4691f29
Convert BlobError into an enum
...
This deletes a lot of code and complexity. Though comes at some cost:
- The type no longer fits in a register and will always be on the
stack.
- Constructing the errors is more verbose, no more auto Into casting.
2019-11-30 23:51:30 +01:00
B. Petersen
084a87ed61
add chatlist tests
2019-11-30 19:38:22 +01:00
B. Petersen
657b53ae0b
sort drafts again to the top of the chatlist
...
this reverts the logical changes done in #811
but keeps the improvements done later eg. in #911 .
the reason for the revert is that it is too hard to
find a started draft in a larget chatlist.
also the shown date would not be just descending.
2019-11-30 19:38:22 +01:00
Alexander Krotov
17cb1226c6
Move OAuth 2 stress tests to oauth2 module
2019-11-30 19:19:05 +01:00
Alexander Krotov
02e281e465
Resultify dc_write_file and related functions
2019-11-30 01:54:42 +01:00
B. Petersen
4e6d0c9c69
fix places where string-cmp was used instead of addr_cmp() for email-address-comparison
2019-11-30 01:49:45 +01:00
B. Petersen
81d069209c
add some tests for addr_cmp()
2019-11-30 01:49:45 +01:00
B. Petersen
63e3c82f9d
compare email-addresses case-insesitive, use this comparison also to check for SELF
2019-11-30 01:49:45 +01:00
Alexander Krotov
e8f2f7b24e
Do not accept prefer-encrypt=reset value from emails
...
Reset is an internal value that received messages should not be able to set.
Also return an error on any value other than "mutual" and "nopreference", errors are converted to NoPreference by the caller.
2019-11-30 01:40:33 +01:00
Alexander Krotov
b7f7e607c1
Use map_err
2019-11-30 01:37:56 +01:00
Alexander Krotov
ac4108b05b
Mark error cause as such
...
See failure crate documentation.
2019-11-30 01:37:56 +01:00
Alexander Krotov
14287b12ae
Resultify Smtp::send
2019-11-30 01:37:56 +01:00
Floris Bruynooghe
1a296cbd4e
Don't let the user wait for so long
2019-11-30 01:11:15 +01:00
Floris Bruynooghe
642276c90c
Attempt to fix race in securejoin handling
...
The ongoing process of dc_join_securejoin() was stopped before the
corresponding chat was created. This resulted in a race-condition
between the sqlite threads executing the creation and query
statements, thus sometimes the query would not find the group and
mysteriously fail.
Tripple-programming with hpk & r10s.
2019-11-30 00:48:14 +01:00
björn petersen
e4b2fd87de
Merge pull request #911 from deltachat/draft-sorting
...
sort newly created chats atop of chatlist
2019-11-29 15:11:06 +01:00
Alexander Krotov
dacde72456
Respect CertificateChecks in IMAP Client::secure
2019-11-29 00:40:50 +01:00
Alexander Krotov
7e66af05ff
Calculate job backoff relative to the current time
...
Otherwise it is possible that desired_timestamp is in the past.
2019-11-29 00:26:25 +01:00
B. Petersen
b6bb5b79af
target comments of @flub
2019-11-28 23:56:12 +01:00
Floris Bruynooghe
f0486eb820
Skip bad jobs in the database
...
Be more defensive: if somehow we got corrupt jobs in the database skip
over them rather than fail to do anything.
This only modifies the query_map() call, the rest is only split off
into it's own function to make it testable. Smaller functions are
good anyway.
2019-11-28 23:41:47 +01:00
B. Petersen
cdc2847b96
use created_timestamp as secondary sort criterion for chatlists
2019-11-28 22:38:53 +01:00
B. Petersen
1d996d9ed9
track created_timetamp for chats
2019-11-28 22:38:48 +01:00
Alexander Krotov
e06ac87c0d
Convert the number of retries to u32
2019-11-28 21:44:16 +01:00
Alexander Krotov
0c19fcd79f
Use Rust for instead of while
2019-11-28 21:44:16 +01:00
Alexander Krotov
02fe3d1b99
Process PerformJobsNeeded::AvoidDos case explicitly
2019-11-28 21:44:16 +01:00
Alexander Krotov
95b90a59dc
Add PerformJobsNeeded enum (DC_JOBS_NEEDED_* in core)
2019-11-28 21:44:16 +01:00