holger krekel
a770a42bc0
address @link2xt comment
2019-12-01 12:03:18 +01:00
holger krekel
c7bfdf5073
move imap errors into imap module
2019-12-01 11:57:01 +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
Alexander Krotov
20ce5f6967
Ignore .rsynclist
2019-11-30 01:32:51 +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
Alexander Krotov
fe7852b64e
Restore JOB_RETRIES constant
2019-11-28 21:44:16 +01:00
holger krekel
f87cb4231c
rename jobs to make "rg Markseen" and other searches for the job enum produce all places dealing with the enum
2019-11-28 19:42:24 +01:00
B. Petersen
7484fb6120
remove boilderplate from sql-statements, see #852
2019-11-28 19:29:44 +01:00
Alexander Krotov
430d4e5f6e
Replace DC_CREATE_MVBOX with boolean
2019-11-28 18:24:29 +01:00
holger krekel
6f6791c1b5
(flub/r10s/hpk42) remove MoveState and related functions because we don't actually need it anymore
2019-11-28 15:57:26 +01:00
holger krekel
bc11ae7245
add a test for bcc-self sent messages getting moved
2019-11-28 15:57:26 +01:00
B. Petersen
de228bdb4b
also move messages sent to ourselves via bcc_self to the DeltaChat folder (other messages are moved in receive_imf())
2019-11-28 15:57:26 +01:00
holger krekel
25fb199ba0
update to current async-imap master which should fix a crash
2019-11-28 13:04:37 +01:00
Alexander Krotov
d0795f5770
Automatically fix some clippy warnings with "cargo fix"
2019-11-27 21:43:18 +01:00
holger krekel
fbb8c8e80c
be less verbose when generating python docs
2019-11-27 13:41:08 +01:00
holger krekel
76610f1e72
rename to more specific name, also not using the difficult to type "succeeded" word :)
2019-11-27 13:02:07 +01:00
holger krekel
618d74cd67
safer interruptability of fake-idle -- reusing the same skip_next_idle pattern as with idle
2019-11-27 05:52:14 +01:00
Alexander Krotov
59700cb477
Restore peerstate constants from C core
2019-11-27 05:41:54 +01:00
Floris Bruynooghe
fc1a136448
Remove unused (async)Arc
...
This identical naming of sync and async arcs is not confusing at all
btw.
2019-11-27 05:39:36 +01:00
holger krekel
42ef43bdf6
test the new event
2019-11-27 00:43:50 +01:00