Commit Graph
100 Commits
Author SHA1 Message Date
link2xt 6ca6a439bd test(node): increase 'static tests' timeout to 5 minutes
It keeps timing out with the default timeout of 2 s on macOS runners.

Also fix comment in the integration test which
said that timeout is 1 minute but sets it to 3 minutes.
Set this timeout to 5 minutes as well.
2024-04-16 10:08:00 +00:00
link2xt 489eae5d66 fix: format error context in Message::load_from_db 2024-04-14 20:40:27 +00:00
link2xt b6c6a63a39 refactor: do not check for is_trash() in get_last_reaction_if_newer_than()
`Message::load_from_db_optional` does not return trashed messages anymore.
2024-04-14 18:46:40 +00:00
link2xt c069190b68 api: don't load trashed messages with Message::load_from_db
API now pretends that trashed messages don't exist.
This way callers don't have to check if loaded message
belongs to trash chat.
If message may be trashed by the time it is attempted to be loaded,
callers should use Message::load_from_db_optional.

Most changes are around receive_status_update() function
because previously it relied on loading trashed status update
messages immediately after adding them to the database.
2024-04-14 17:43:41 +00:00
link2xt 6080a52024 chore(cargo): update brotli from 4 to 5 2024-04-13 18:27:26 +00:00
link2xt 0aea7d1e02 fix: do not create ad-hoc groups from partial downloads 2024-04-12 01:19:16 +00:00
link2xt 08cbc54c00 fix: assign messages to chats based on not fully downloaded references 2024-04-12 01:19:16 +00:00
link2xt 9731ec419e build(nix): use stable Rust in flake.nix devshell
This way nightly clippy warnings are not generated
when devshell is used.

Nighly Rust is also not cached, e.g. rust-analyzer has to be rebuilt
if version from fenix is used.
2024-04-11 22:25:06 +00:00
link2xt d39cbcdc8d ci: use cargo-nextest instead of cargo-test 2024-04-10 23:57:43 +00:00
link2xt fbbefe6b49 chore: fix nightly clippy warnings 2024-04-10 15:41:48 +00:00
link2xt a3b62b9743 fix(deltachat-rpc-client): construct Thread with target keyword argument
`run` argument does not exist.

Also add `daemon=True`.
2024-04-09 05:55:38 +00:00
link2xt 9aa4c0e56b refactor(deltachat-rpc-client): use list, set and tuple instead of typing
`typing.List` is deprecated according to https://docs.python.org/3/library/typing.html#typing.List
Similar for `Set` and `Dict`.

`from __future__ import annotations` is for compatibility with Python 3.7.
2024-04-09 00:56:10 +00:00
link2xt c1148e4117 chore(cargo): update env_logger 2024-04-08 19:44:35 +00:00
link2xt 2be28f1311 test: move reaction tests to JSON-RPC 2024-04-08 19:11:16 +00:00
link2xt 2e42243de8 feat: port direct_imap.py into deltachat-rpc-client 2024-04-08 19:11:16 +00:00
link2xt 00f2585d8c api(deltachat-rpc-client): add ACFactory.get_accepted_chat() 2024-04-08 19:11:16 +00:00
link2xt 0b73f9cebd api(deltachat-rpc-client): add Account.bring_online() 2024-04-08 19:11:16 +00:00
link2xt f5e8a04fd0 api(deltachat-rpc-client): return Message from Message.send_reaction() 2024-04-08 19:11:16 +00:00
link2xt 6721df7d57 api(deltachat-rpc-client): add Account.wait_for_reactions_changed() 2024-04-08 19:11:16 +00:00
link2xt 18d98d643b api(deltachat-rpc-client): add Chat.send_file() 2024-04-08 19:11:16 +00:00
link2xt 62758658ed api(deltachat-rpc-client): add Message.wait_until_delivered() 2024-04-08 19:11:16 +00:00
link2xt 03bb751a9b api(deltachat-rpc-client): add Account.create_chat() 2024-04-08 19:11:16 +00:00
link2xt 3ebb1ea95f chore(cargo): require tokio 1.37 and chrono 0.4.37
Make deps.rs happy about RUSTSEC-2020-0159 and RUSTSEC-2023-0001
2024-04-08 16:39:30 +00:00
link2xt 5bcc44ca9b chore: use ruff check instead of ruff
`ruff` without `check` is deprecated.
2024-04-07 19:57:05 +00:00
link2xt 4304e3f0be chore(cargo): require tokio 1.37.0
Make deps.rs happy about RUSTSEC-2023-0001
2024-04-07 19:18:44 +00:00
link2xt e2e3abdf03 chore(cargo): update base64 to 0.22 2024-04-07 19:16:44 +00:00
link2xt dcea188b62 chore(cargo): require smallvec 1.13.2
Make deps.rs happy about RUSTSEC-2021-0003
2024-04-07 19:12:34 +00:00
link2xt 5cf725a378 chore(cargo): require kamadak-exif 0.5.3
Make deps.rs happy about RUSTSEC-2021-0143
2024-04-07 19:09:58 +00:00
link2xt 2bf0ea9d91 docs: add deps.rs badge 2024-04-07 19:06:42 +00:00
link2xt 9ab2c6df16 fix(deltachat-jsonrpc): block in inner_get_backup_qr
This change avoids the race between
`provide_backup` changing the state from NoProvider to Pending
and a call to `get_backup_qr` or `get_backup_qr_svg`.
With this change `get_backup_qr` and `get_backup_qr_svg`
always block until QR code is available,
even if `provide_backup` was not called yet.
2024-04-07 14:20:39 +00:00
link2xt cf11741a8c refactor: do not ignore Contact::get_by_id errors in get_encrinfo 2024-04-07 10:12:17 +00:00
link2xt 65c9e72bf4 test: test withdrawing group join QR codes 2024-04-05 22:34:02 +00:00
link2xt ea4d954c77 fix: do not emit MSGS_CHANGED event for outgoing hidden messages
This includes synchronization messages.
2024-04-05 22:34:02 +00:00
link2xt 43523a96a2 api(deltachat-rpc-client): add check_qr and set_config_from_qr APIs 2024-04-05 22:34:02 +00:00
link2xt 2e2fa9e74f chore: update lockfile in /fuzz 2024-04-05 19:44:51 +00:00
link2xt 2f0f247e70 refactor: use Rust 1.77.0 support for recursion in async functions 2024-04-04 17:01:15 +00:00
link2xt e465415039 fix: do not ignore Message::load_from_db errors 2024-04-04 01:44:50 +02:00
link2xt 50165b3e35 chore: upgrade image from 0.24.9 to 0.25.1 2024-04-03 20:59:06 +00:00
link2xt 0be8b5a5c4 chore: upgrade h2 from 0.4.3 to 0.4.4
This upgrade contains a fix for RUSTSEC-2024-0332
2024-04-03 20:34:14 +00:00
link2xt 02014eda6c chore: update from brotli 3.4.0 to brotli 4.0.0 2024-04-03 17:25:28 +00:00
link2xt f1c6cd69e9 chore: update chrono from 0.4.34 to 0.4.37 2024-04-03 16:49:19 +00:00
link2xt 3f35b442c3 chore(release): prepare for 1.137.1 2024-04-03 01:28:13 +00:00
link2xt 87e9365016 ci: remove android builds for x86 and x86_64
They are failing to build.
2024-04-03 01:17:21 +00:00
link2xt 9806509f4a chore(release): prepare for 1.137.0 2024-04-02 21:22:58 +00:00
link2xt 91600a34b6 chore(cargo): update aho-corasick from 1.1.2 to 1.1.3 2024-04-02 21:11:04 +00:00
link2xt a890fe3a9a chore(cargo): bump reqwest from 0.11.24 to 0.12.2
This also removes duplicate dependencies
for `http-body`, `http` and `hyper`.
2024-04-02 18:58:13 +00:00
link2xt 2b8bf29fce api(deltachat-rpc-client): add futures
futures allow to call multiple methods in parallel
without threads.

This introduces RpcFuture class and futuremethod decorator.
2024-04-02 16:54:25 +00:00
link2xt 26400a9e4e chore: update deny.toml 2024-04-02 16:39:45 +00:00
link2xt 22c0aef9c0 build(python): remove setuptools_scm dependency
We update version in several .toml and .json files
on every release anyway, so updating pyproject.toml is easy.

setuptools_scm makes it more difficult to build
python packages for software distributions
because it requires full git checkout
with tags rather than just a worktree.
It is also possible to remove or move tags
after the release, so git revision no longer
pins python package version if setuptools_scm is used.
2024-04-02 04:43:39 +00:00
link2xt 87805bc36d build: add repository to Cargo.toml 2024-03-31 22:40:01 +00:00
link2xt ebd097bdbe ci: shorter names for deltachat-rpc-server jobs 2024-03-28 06:57:44 +00:00
link2xt a11d01f8a3 ci: build deltachat-rpc-server for Android 2024-03-28 06:57:44 +00:00
link2xt 38491b694b build(nix): add outputs for Android binaries
Using NDK 24 because NDK 23 does not have getauxval() function.
2024-03-28 06:57:44 +00:00
link2xt e702c1a8ca feat: include more entries into DNS fallback cache 2024-03-25 10:30:08 +00:00
link2xt 1adea3c678 fix: put overridden sender name into message info 2024-03-25 05:19:04 +00:00
link2xt 9af812a3e7 refactor(jsonrpc): add msg_id and account_id to get_message() errors 2024-03-24 18:18:34 +00:00
link2xt 36bdf8a67e fix: do not ignore Contact::get_by_id() error in from_field_to_contact_id() 2024-03-24 18:18:34 +00:00
link2xt 20b30fc70a refactor: remove MessageObject::from_message_id()
It accepted u32, not Message-ID.
There is a properly typed from_msg_id function
that accepts MsgId next to it.
2024-03-24 18:18:34 +00:00
link2xt e59ff6ca74 feat: include 3 recent Message-IDs in References header
Do not include oldest reference, because chat members
which have been added later and have not seen the first message
do not have referenced message in the database.

Instead, include up to 3 recent Message-IDs.
2024-03-23 02:06:24 +00:00
link2xt 71c2383cbe ci: update to Rust 1.77.0 2024-03-22 19:44:15 +00:00
link2xt 5f5b272726 chore: add result to .gitignore 2024-03-22 18:42:08 +00:00
link2xt b34fe8f118 feat: do not include provider hostname in Message-ID
It is leaked by anonymous mailing lists,
making it possible to tell which provider the sender is using.
Use `localhost` as the hostname instead.
2024-03-20 00:36:15 +00:00
link2xt 1ebbe26ebb api!: remove data from DC_EVENT_INCOMING_MSG_BUNCH
It is not used by existing clients
and incorrectly included all downloaded messages,
including outgoing messages and MDNs.
2024-03-19 14:21:35 +00:00
link2xt 0f5d5dd2b2 build(cmake): build outside the source tree
If user specifies build directory, respect this
instead of building inside the target/ directory.

Also remove outdated comment about Rust 1.50.0 support.
Current MSRV is 1.70.0 and we use 2021 edition
which implies version 2 resolver.
2024-03-19 12:14:33 +00:00
link2xt 473dbe01af chore(release): prepare for 1.136.6 2024-03-19 03:57:44 +00:00
link2xt 069ed7afa6 chore: nix flake update 2024-03-19 03:56:11 +00:00
link2xt 9313ece3cd ci: automate publishing of deltachat-rpc-server to PyPI 2024-03-19 03:25:39 +00:00
link2xt 900168c68c build: read version from Cargo.toml in wheel-rpc-server.py 2024-03-19 03:25:39 +00:00
link2xt 0bd137b4e5 build: add description to deltachat-rpc-server wheels
This is required to pass `twine check`.
2024-03-19 03:04:40 +00:00
link2xt 75da205ff6 docs(deltachat-rpc-server): update deltachat-rpc-client URL 2024-03-19 03:04:40 +00:00
link2xt 67e5fbbfe3 ci: update actions/cache from v3 to v4 2024-03-19 02:17:04 +00:00
link2xt 570daf42ec chore(release): prepare for 1.136.5 2024-03-19 00:01:25 +00:00
link2xt fcbbb91cde docs(deltachat-rpc-client): document that 0 is a special value of set_ephemeral_timer() 2024-03-18 20:15:54 +00:00
link2xt c3a7fc4c8d test: test that reordering of Member added message results in square bracket error
This is a test reproducing the problem
in <https://github.com/deltachat/deltachat-core-rust/issues/5339>.
Fix would be to avoid reordering on the server side,
so the test checks that the unverified message
is replaced with a square bracket error
as expected if messages arrive in the wrong order.
2024-03-18 18:14:06 +00:00
link2xt 8cc348bfa4 fix: terminate ephemeral and location loop immediately on channel close
When scheduler is destroyed, e.g. during a key import,
there is some time between destroying the interrupt channel
and the loop task.

To avoid busy looping, tasks should terminate if
receiving from the interrupt loop fails
instead of treating it as the interrupt.
2024-03-15 01:26:23 +00:00
link2xt 76bbd5fd72 build: add README to deltachat-rpc-client Python packages 2024-03-11 14:42:32 +01:00
link2xt eaed2381e7 chore(release): prepare for 1.136.4 2024-03-11 12:52:46 +00:00
link2xt 6198ed0ef5 ci: add workflow for automatic publishing of deltachat-rpc-client 2024-03-11 11:45:02 +00:00
link2xt 9f4af679a3 build: build deltachat-rpc-server wheels with nix 2024-03-10 20:22:47 +00:00
link2xt 9f7defa8da build(nix): make .#libdeltachat buildable on macOS 2024-03-09 19:10:11 +00:00
link2xt e9d7fe0561 chore(release): prepare for 1.136.3 2024-03-09 16:07:15 +00:00
link2xt 2030de11d9 chore: fix 2024-03-05 nightly clippy warnings 2024-03-08 02:53:47 +00:00
link2xt 2c5a0cac5f build(nix): include SystemConfiguration framework on darwin systems 2024-03-08 00:28:51 +00:00
link2xt 251917e602 build(nix): cleanup cross-compilation code 2024-03-08 00:28:51 +00:00
link2xt 273719ae7c ci: wait for build_windows task before trying to publish it 2024-03-07 23:45:06 +00:00
link2xt 5addfa8d1d chore(release): prepare for 1.136.2 2024-03-05 22:42:36 +00:00
link2xt 02d68332c7 build: downgrade cc to 1.0.83
1.0.84 and 1.0.85 are yanked.
With 1.0.86 and 1.0.89 Delta Chat for Android fails to build.

Fixes <https://github.com/deltachat/deltachat-android/issues/2972>.
2024-03-05 22:21:28 +00:00
link2xt 97abb9a0a9 ci: update setup-node action 2024-03-05 03:19:46 +00:00
link2xt d0e0cfafef chore(release): prepare for 1.136.1 2024-03-05 01:23:12 +00:00
link2xt f630b5fb39 chore: update node constants 2024-03-05 01:18:22 +00:00
link2xt d9bab938d5 build: restore MSRV 1.70.0 2024-03-05 01:04:49 +00:00
link2xt 215ec14b20 build: revert to OpenSSL 3.1
OpenSSL 3.2 build currently fails under Nix
so we cannot build deltachat-rpc-server releases:
<https://github.com/alexcrichton/openssl-src-rs/issues/235>
2024-03-05 00:14:52 +00:00
link2xt ea728e9b62 docs: add missing 1.136.0 link to changelog 2024-03-04 21:33:20 +00:00
link2xt 2af9ff1d01 chore(release): prepare for 1.136.0 2024-03-04 21:10:04 +00:00
link2xt 7502234686 api: dc_accounts_set_push_device_token and dc_get_push_state APIs 2024-03-04 21:10:04 +00:00
link2xt 863a386d0f test: test that ASM "encrypted" with plaintext algorithm is not accepted 2024-03-04 21:10:04 +00:00
link2xt e4b49dfdef fix: validate Group IDs and SecureJoin tokens 2024-03-04 21:10:04 +00:00
link2xt 781d3abdb9 fix: make should_do_gossip() return true even if we send securejoin only to Alice 2024-03-04 21:10:04 +00:00
link2xt 78d01933ad fix: don't leak Group-ID in Message-ID
Chat assignment based on In-Reply-To and References works good enough
even if the message cannot be decrypted.
2024-03-04 21:07:10 +00:00
link2xt 8d09291d1e fix: do not send Secure-Join-Group in vg-request
Secure-Join-Group is only expected by old core in vg-request-with-auth.
There is no reason to leak group ID in unencrypted vg-request.
Besides that, Secure-Join-Group is deprecated
as Alice knows Group ID corresponding to the auth code,
so the header can be removed completely eventually.
2024-03-04 21:07:10 +00:00