Commit Graph
100 Commits
Author SHA1 Message Date
link2xt 3743aaa16e Refactor fetch_many_msgs and add more logging 2022-12-05 12:54:40 +00:00
link2xt 7e5becb5e5 Log the reason when the message cannot be sent to the chat 2022-12-04 18:51:14 +00:00
link2xt b4f348ccea Merge async JSON-RPC client
PR: https://github.com/deltachat/deltachat-core-rust/pull/3734
2022-12-04 21:02:50 +03:00
link2xt 5502bff986 Make _args and _kwargs private in Rpc 2022-12-04 14:03:59 +00:00
link2xt ee19789cac Make _rpc private 2022-12-04 14:03:43 +00:00
link2xt bad5a1de55 Ignore .tox everywhere, not only in python/ 2022-12-04 13:57:38 +00:00
link2xt 3cdbe213a3 python: rename Deltachat class into DeltaChat 2022-12-04 13:56:53 +00:00
link2xt 4df588668a Bump MSRV to 1.61.0
This is required by `image` crate.

Also update current Rust version to 1.65.0.
2022-12-04 12:24:17 +00:00
link2xt 2ccf39800d Remove start_rpc_server() and make Rpc a context manager
Rpc now has a start() method.
This way it is possible to use Rpc from IPython without calling __aenter__()
2022-12-04 00:02:32 +00:00
link2xt 5a3065344e Properly terminate Rpc and remove sleep() hack 2022-12-03 23:30:50 +00:00
link2xt 98b6b5e3f6 Update instructions on using ipython 2022-12-03 18:37:02 +00:00
link2xt 7f4c05e88f ci: do not use deprecated set-output
See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-12-03 13:54:11 +00:00
link2xt 20e63659a1 CI: update GitHub Actions to avoid deprecation warnings 2022-12-03 13:51:57 +00:00
link2xt 85b4746516 Turn start_rpc_server into a context manager 2022-12-01 16:36:36 +00:00
link2xt 53d6807e8d Simplify process_messages() in echo bot 2022-11-30 22:45:03 +00:00
link2xt db38cc8891 Add get_fresh_messages_in_arrival_order() call 2022-11-30 22:43:05 +00:00
link2xt 4e2aeceeec Do not reverse the list of fresh messages
Both reversed and original order do not make much sense
for the bot. Ideally bots should have their own key
to get the list of fresh messages in the order of IDs.
2022-11-30 22:38:25 +00:00
link2xt 9b04a04568 Add async python client for Delta Chat core JSON-RPC 2022-11-30 20:21:59 +00:00
link2xt f2c97bda66 jsonrpc: add message errors to MessageObject 2022-11-30 20:35:36 +01:00
link2xt 47743bdcfa Update humansize to version 2 2022-11-28 15:50:45 +00:00
link2xt b0962363c2 Merge branch 'link2xt/peerstate-to-save-simplify' 2022-11-27 17:11:19 +00:00
link2xt 8855ef72bc Clippy fix 2022-11-27 17:10:46 +00:00
link2xt 264727a414 Changelog 2022-11-27 17:10:46 +00:00
link2xt 98c16ddc4d Remove Peerstate.to_save 2022-11-27 17:10:46 +00:00
link2xt c7691fbebe Use UPSERT when saving peerstates
This way there is no need to distinguish between creating
and updating peerstate.
2022-11-27 17:10:46 +00:00
link2xt 62f92d5b28 Add UNIQUE constraint to acpeerstates table 2022-11-27 17:10:46 +00:00
link2xt 2ae9165bfb Remove different states of ToSave in peerstate 2022-11-27 17:10:46 +00:00
link2xt 08de326930 Fix misplaced info! message 2022-11-27 10:03:47 +00:00
link2xtandmissytake b341cfd4d9 mimeparser: assume all Thunderbird users prefer encryption
Co-Authored-By: missytake <missytake@systemli.org>
2022-11-24 19:20:56 +00:00
link2xt a76b018900 Move changelog entry to the correct section 2022-11-24 11:23:36 +00:00
link2xt 6f0985dcaa Changelog 2022-11-23 22:38:12 +00:00
link2xt afb7f89722 Do not try to redownload the message in case of any error
Since switch to async we don't have spurious "database is busy"
errors anymore. Since an error is irrecoverable in most cases,
we can skip the message. The cost of this is we may
accidentally skip a correct message if I/O fails, but
the advantage is that we are guaranteed to never confuse
irrecoverable error with recoverable one and get stuck in
infinite loop redownloading the same message over and over.
2022-11-23 17:56:56 +00:00
link2xt 0248a36561 Release 1.102.0 (#3773) 2022-11-23 18:47:49 +01:00
link2xt da6c68629d jsonrpc: do not return a result from deleteContact()
It was always true anyway.
2022-11-17 18:36:38 +00:00
link2xt b63baf939e Ignore two typescript errors
`as any` is not enough anymore.
2022-11-16 14:06:17 +00:00
link2xt 90d8e0cedc Fix detection of Trash, Junk, All etc. folders
imap_proto has been updated, so attributes like `\All`,
`\Junk` from RFC 3501 and RFC 6154 are no longer considered
extensions.
2022-11-15 23:40:07 +00:00
link2xt 1c2d4c518e Fix typos 2022-11-15 23:23:44 +00:00
link2xt 428ef11157 Add IMAP UIDs to message info (#3755) 2022-11-15 15:19:32 +01:00
link2xt ee34b64f5d Pop recently seen loop event out of the queue when it's in the past 2022-11-15 11:29:13 +00:00
link2xt 996be5d247 Improve IMAP logging
https://github.com/deltachat/deltachat-core-rust/pull/3749
2022-11-14 11:41:52 +00:00
link2xt 7d45419724 Convert anyhow errors to select_folder errors with alternate fmt 2022-11-14 11:40:40 +00:00
link2xt c0ae5c0fb7 Use anyhow for close_folder() errors 2022-11-13 23:49:34 +00:00
link2xt 09042d12d4 Changelog 2022-11-13 20:35:05 +00:00
link2xt 7db147da14 Log fake IDLE interruptions 2022-11-13 20:35:05 +00:00
link2xt 1324b5da13 Rename folder argument into folder_config 2022-11-13 20:35:05 +00:00
link2xt 4ee14e6e77 Add more contexts to IMAP errors 2022-11-13 20:35:05 +00:00
link2xt e1d50757b3 Better format for scan_folders errors 2022-11-13 20:35:05 +00:00
link2xt 9a447e8554 Log IDLE errors with all contexts 2022-11-13 20:35:05 +00:00
link2xt 516a5e9c5f Add contexts to both the timeout and actual IDLE error
Note that `IMAP IDLE protocol timed out` was previously
added to the wrong error: not the timeout error (first `?`)
but actual error happened during IDLE, such as a network error.
2022-11-13 20:35:05 +00:00
link2xt 4744f5eecf Add folder name to IMAP IDLE interrupt logs 2022-11-13 22:11:47 +03:00
link2xt 33839b5667 imap: log disconnection attempts 2022-11-13 17:59:28 +00:00
link2xt 43f2d64a6f imap: flatten fetch_idle() 2022-11-13 17:59:28 +00:00
link2xt 13f30c3167 Add configured_inbox_folder to account info
This goes into the log on Android.
2022-11-13 16:21:44 +00:00
link2xt b9f1f9c41e jsonrpc: add invalid key to {get,set}_config error 2022-11-08 21:55:25 +00:00
link2xt fcf0cb5d69 MSRV is now 1.57 2022-11-07 18:24:54 +00:00
link2xt a271baa1ae Update rpgp to 0.9 and bump MSRV to 1.57.0 2022-11-07 18:23:26 +00:00
link2xt 5ee6cba557 Update Cargo.lock 2022-11-06 21:27:21 +00:00
link2xt 475d18bd37 Update deltachat-rpc-server version 2022-11-06 21:26:05 +00:00
link2xt 75ed4fe398 JSON-RPC stdio server
It speaks JSON-RPC serialized into JSON Lines over stdio.
2022-11-06 20:33:24 +00:00
link2xt d29b0baa25 Prepare core release 1.99.0 2022-11-06 17:41:47 +00:00
link2xt e648e4fb29 DKIM-Checking: Don't disallow keychanges for now (#3728) 2022-11-06 16:18:21 +00:00
link2xt e93dc33ef8 Do not allow peerstate reset if DKIM check failed
The problem was that a message without Autocrypt key or with a wrong
signature resets peerstate regardless of what DKIM check says. I
inserted sleep(1.1) to make sure reset always happens and make the bug
reproducible, then fixed it by forbidding reset if DKIM check fails.

https://github.com/deltachat/deltachat-core-rust/pull/3731
2022-11-05 01:44:37 +00:00
link2xt cb1a4291d0 Accept ToString instead of AsRef<str> in Params.set() (#3732) 2022-11-05 02:17:29 +01:00
link2xt 1a745b24d7 Merge branch 'unwrap-mailinglistaddr-in-cffi'
https://github.com/deltachat/deltachat-core-rust/pull/3706
2022-11-05 01:14:11 +00:00
link2xt 7b7ce30fe3 Changelog 2022-11-05 01:13:35 +00:00
link2xt 9bc525f579 Fix mailinglist test 2022-11-04 23:30:56 +00:00
link2xt 037739c634 mimeparser: do not allow key reset if DKIM check failed 2022-11-04 21:04:24 +00:00
link2xt 91ab10084a Make error reproducible with sleep() 2022-11-04 19:45:29 +00:00
link2xt 96d2a7f0bf Assert that encryption preference is still mutual 2022-11-04 18:57:18 +00:00
link2xt 053c9372cb peerstate: use named columns for SELECT statements
This ensures wrong column is not accidentally used.
2022-11-04 18:55:32 +00:00
link2xt 15db5adc7e Merge branch 'flub/unoptimised-debug'
https://github.com/deltachat/deltachat-core-rust/pull/3699
2022-11-04 13:14:35 +00:00
link2xt 146478e450 Optimize debug builds, but not tests 2022-11-04 12:33:08 +00:00
link2xt 97192a8055 Set RUST_MIN_STACK for Python tests 2022-11-04 12:32:22 +00:00
link2xt 772514940c Set RUST_MIN_STACK in JSON-RPC tests 2022-11-04 12:32:22 +00:00
link2xt e3bf8265c4 Recently seen loop 2022-11-03 20:18:14 +00:00
link2xt 47fcdef88c cargo update -p mio
mio 0.8.5 does not use libc epoll_create1() function on Android anymore,
so it will be possible to revert https://github.com/deltachat/deltachat-android/commit/e29b6f9974bcad9a1e97493979f261cdb4cf4ea3
in the next Android release with the new core.
2022-11-01 23:12:45 +00:00
link2xt d81579730e Allow sender timestamp to be in the future
This can happen due to unsynchronized clocks or
when "smeared" timestamp is used as the sender sends
multiple messages without delay.
2022-10-30 10:26:22 +00:00
link2xt b6b2f453a0 Prepare 1.98.0 2022-10-24 16:09:24 +00:00
link2xt aa14015919 sql: every Result is anyhow::Result 2022-10-23 11:25:27 +00:00
link2xt 434e53e922 Use UPSERT to insert into msgs table
This way no temporary rows are created and it is easier to maintain
because UPDATE statement is right below the INSERT statement,
unlike `merge_messages` function which is easy to forget about.
2022-10-22 21:34:56 +00:00
link2xt b5d238f7f4 Keep reactions when downloading partially downloaded message 2022-10-22 15:02:05 +00:00
e5c9fea52d Implement reactions
Co-Authored-By: bjoern <r10s@b44t.com>
Co-Authored-By: Simon Laux <mobile.info@simonlaux.de>
2022-10-22 09:59:43 +00:00
link2xt b2939d3df3 imap: simplify UPSERT queries on imap_sync
Use `excluded` and remove noop `WHERE` query.

See <https://www.sqlite.org/lang_UPSERT.html> for official SQLite documentation.
2022-10-16 16:34:13 +00:00
link2xt 54a157a629 Prepare 1.97.0 release (#3668) 2022-10-16 15:08:55 +02:00
link2xt f0dede26a3 cargo fmt 2022-10-16 11:30:01 +00:00
link2xt f80c78536f fix unused result error 2022-10-15 13:11:53 +00:00
link2xt 6f329c9e96 Fix unix timestamp used for daymarker 2022-10-12 18:38:03 +00:00
link2xt b85f6ea6c3 contact: do not ignore SQL errors in add_or_lookup 2022-10-11 16:42:17 +00:00
link2xt 8b6290120e Create bob with new_bob(), not new_alice() 2022-10-09 22:51:37 +00:00
link2xt 9277b46620 Suppress welcome device messages after account import
Add dummy `devmsglabels` entries on import to avoid welcome messages
being added when user runs reconfiguration on imported account.
2022-10-02 21:55:27 +00:00
link2xt 261926222b Use anyhow::Result in stock_str.rs 2022-10-02 20:49:45 +00:00
link2xt 35cfefd934 Share stock strings across accounts
All contexts created by the same account manager
share stock string translations. Setting translation on
a single context automatically sets translations for all other
accounts, so it is enough to set translations on the active account.
2022-10-02 19:12:04 +00:00
link2xt 17276179e7 python: fix test_getinfo after bcc_self default change 2022-09-25 10:29:48 +00:00
link2xt 335d780f3e Fix Python test for bcc_self 2022-09-25 10:09:26 +00:00
link2xt 450d113993 Fix Rust 1.64 clippy warnings and tests 2022-09-25 03:17:00 +00:00
link2xt ffe7216194 Emit per-message events for expired messages
Instead of emitting single MsgsChanged event
with zero chat and msg IDs, emit one event per message.

Also emit WebxdcInstanceDeleted event if expired message
contains a webxdc.
2022-09-17 21:23:47 +00:00
link2xt 474eb7cbc8 Fix changelog PR reference 2022-09-17 17:51:33 +00:00
link2xt 252b528f40 Update "How messages are deleted" documentation
"IMAP folder and UID information" is no longer stored
in the `msgs` table since creation of the `imap` table.
As a result `msgs` table entries do not contain UID information in the
first place.

This commit updates documentation to reflect this change and also
points to `prune_tombstones()` procedure which actually deletes `msgs`
rows.
2022-09-17 17:18:53 +00:00
link2xt 569628a202 Release 1.94.0 2022-09-16 23:02:05 +00:00
link2xt c75bc66560 Make initiate_key_transfer() non-blocking 2022-09-16 22:03:25 +00:00