Commit Graph
149 Commits
Author SHA1 Message Date
iequidoo b5f2c747e0 feat: Context::set_config(): Restart IO scheduler if needed (#5111)
Restart the IO scheduler if needed to make the new config value effective (for `MvboxMove,
OnlyFetchMvbox, SentboxWatch` currently). Also add `set_config_internal()` which doesn't affect
running the IO scheduler. The reason is that `Scheduler::start()` itself calls `set_config()`,
although not for the mentioned keys, but still, and also Rust complains about recursive async calls.
2024-02-12 15:41:11 -03:00
Hocuri ec9d104cf3 Basic self-reporting, core part (#5129)
Part of https://github.com/deltachat/deltachat-android/issues/2909

For now, this is only sending a few basic metrics.
2024-02-07 20:23:11 +01:00
link2xt d6c24eb9f6 Make Accounts::background_fetch() not return Result 2024-01-31 14:04:03 +01:00
link2xt f7fd1ef2bf Emit DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE even on timeout
Otherwise if there is a timeout,
UI will wait for DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE forever.
2024-01-31 14:04:03 +01:00
link2xt af7bf5bd2b s/forgeting/forgetting/ 2024-01-31 14:04:03 +01:00
link2xt ea666f1098 Hide background_fetch_without_timeout from public API 2024-01-31 14:04:03 +01:00
Simon Lauxandbjoern 5bb80f94c7 Apply suggestions from code review
Co-authored-by: bjoern <r10s@b44t.com>
2024-01-31 14:04:03 +01:00
Simon Laux de86b8a96e rename event also in core 2024-01-31 14:04:03 +01:00
Simon Laux 060c9c8aa1 cargo fmt 2024-01-31 14:04:03 +01:00
Simon Laux 727428a965 rename event and mention event in method documentation 2024-01-31 14:04:03 +01:00
Simon Laux df455bbcf5 BackgroundFetchCompletedForAllAccounts event 2024-01-31 14:04:03 +01:00
Simon Laux d2c61dc90e api: jsonrpc: add background_fetch_for_all_accounts 2024-01-31 14:04:03 +01:00
Simon Lauxandiequidoo 19dce9ddfa api!: jsonrpc: device message api now requires Option<MessageData> instead of String for the message (#5211)
api: jsonrpc: device message api now setting empty device messages to
block adding a message for a specific label

required for https://github.com/deltachat/deltachat-desktop/pull/3639

---------

Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
2024-01-25 11:26:11 +01:00
Sebastian Klähnandlink2xt 4ee646ce0b feat(api): Add is_bot to cffi and jsonrpc (#5197)
@adbenitez wants this feature on Deltalab to display a bot tag. 
Other UIs might also want to adopt this feature :)

---------
Co-authored-by: link2xt <link2xt@testrun.org>
2024-01-20 15:00:10 +00:00
Sebastian Klähnandbjoern 4bc90701cc feat: Add system message when provider does not allow unencrypted messages (#5161) (#5195)
close #5161

![Screenshot from 2024-01-19
19-56-09](https://github.com/deltachat/deltachat-core-rust/assets/39526136/27ecdd9b-1739-410b-bb26-80d5bdbbc39a)

---------

Co-authored-by: bjoern <r10s@b44t.com>
2024-01-20 11:47:23 +00:00
iequidoo 406b59501b chore: deltachat-jsonrpc/src/api/types/events.rs: Apply rustfmt 2024-01-11 21:53:26 -03:00
iequidoo d5da2bed75 feat: Add ConfigSynced event
Add an event for a case if a multi-device synced config value changed. Maybe the app needs to
refresh smth on such an event. For uniformity it is emitted on the source device too. The value is
omitted, otherwise it would be logged which might not be good for privacy.
2024-01-11 21:53:26 -03:00
link2xt 2f8a8f9f50 ci: update to Rust 1.75.0 and fix clippy 2024-01-08 20:01:40 +00:00
link2xt ff3bf4791a chore: update dependencies 2023-12-03 00:43:21 +00:00
link2xt 998614b923 api: make Contact.is_verified() return bool 2023-11-30 12:04:03 +00:00
Hocuri 72bacd56f7 Update securejoin links 2023-11-18 11:30:59 +01:00
bjoern 0ee68d1dfc back to two verification-check functions (#4966)
this pr keeps and refines documentation added in #4951, however, reverts
the api introduced by #4951
which turns out to be not useful for UI in practise:

UI anyway check for chat/no-chat beforehand,
so a simple condition in profiles as
`green_checkmark = chat_exist ? chat_is_protected() :
contact_is_verified()`
is more useful in practise and is waht UI need and did already in the
past. (https://github.com/deltachat/deltachat-android/pull/2836 shows a
detailed discussion)

(as a side effect, beside saving code,
this PR saves up to three database calls
(get contact from chat in UI to pass it to profile_is_verified(), get
chat from contact in core, load is_protected in core) - instead, core
can use already is_protected from already loaded chat object)

/me did check rust-tests, fingers crossed for python tests
/me should re-setup python tests on local machine at some point :)
2023-11-09 23:31:18 +01:00
link2xt 48416289ac api: add dc_contact_is_profile_verified() 2023-11-07 18:14:33 +00:00
link2xt 7c744d14d7 docs: contact profile view should not use dc_contact_is_verified()
Green checkmark in the contact profile
should only be displayed in the title
if the same checkmark is displayed in the title of 1:1 chat.
If 1:1 chat does not exist,
the checkmark should not be displayed in the title
of the contact profile.

Also add docs to is_protected
property of FullChat and BasicChat JSON objects.
2023-11-05 17:21:23 +00:00
link2xt d840a7e6b9 api!: remove deprecated get_verifier_addr 2023-11-03 23:17:09 +00:00
bjoernandlink2xt c600bfa8ca docs: refine Contact::get_verifier_id and Contact::is_verified documentation (#4922)
Co-authored-by: link2xt <link2xt@testrun.org>
2023-11-03 21:11:03 +00:00
link2xt caffc3d93c fix(json-rpc): return verifier even if the contact is not verified
This may happen if autocrypt key is changed after verification.
UI should still display who introduced the contact,
especially if the contact is still a member of some verified group.
If the contact is at the same time not verified,
i.e. its autocrypt key does not match verified key,
UI may display a crossed out checkmark instead of green checkmark.
2023-11-03 17:51:11 +00:00
link2xt a4dcf656f3 api: add JSON-RPC get_chat_id_by_contact_id API (#4918) 2023-11-03 13:55:07 +00:00
link2xt 0431ae53ca hack: decrease ratelimit for .testrun.org subdomains 2023-11-02 00:30:44 +00:00
Simon Laux f130d537b7 api(jsonrpc): add get_message_info_object 2023-10-29 16:26:01 +00:00
Simon Laux 542bd4cbb8 api!: jsonrpc misc_set_draft now requires setting the viewtype 2023-10-28 08:42:14 +00:00
link2xt 97176b13f1 api(jsonrpc): add id to ProviderInfo 2023-10-27 03:07:18 +00:00
link2xt 18bb7e58be refactor: move api/mod.rs to api.rs 2023-10-27 02:33:17 +00:00
Simon Laux c2bab44bdd api: jsonrpc add .is_protection_broken to FullChat and BasicChat 2023-10-27 00:03:12 +00:00
link2xt 53bb8a9831 chore: update to async-channel 2 2023-10-26 23:41:34 +00:00
link2xt 54410dbe49 Merge tag 'v1.126.0' 2023-10-22 15:16:11 +00:00
Asiel Díaz Benítez 934ca6a7d7 api: add send_draft() to JSON-RPC API (#4839) 2023-10-22 13:14:08 +00:00
Hocuri 8573649bf7 feat: Make broadcast lists create their own chat (#4644)
feat: Make broadcast lists create their own chat - UIs need to ask for
the name when creating broadcast lists now (see
https://github.com/deltachat/deltachat-android/pull/2653)

That's quite a minimal approach: Add a List-ID header to outgoing
broadcast lists, so that the receiving Delta Chat shows them as a
separate chat, as talked about with @r10s and @hpk42.

Done:
- [x] Fix an existing bug that the chat name isn't updated when the
broadcast/mailing list name changes (I already started this locally)

To be done in other PRs:
- [ ] Right now the receiving side shows "Mailing list" in the subtitle
of such a chat, it would be nicer if it showed "Broadcast list" (or
alternatively, rename "Broadcast list" to "Mailing list", too)
- [ ] The UIs should probably ask for a name before creating the
broadcast list, since it will actually be sent over the wire. (Android
PR: https://github.com/deltachat/deltachat-android/pull/2653)

Fixes https://github.com/deltachat/deltachat-core-rust/issues/4597

BREAKING CHANGE: This means that UIs need to ask for the name when creating a broadcast list, similar to https://github.com/deltachat/deltachat-android/pull/2653.
2023-10-17 10:40:47 +02:00
Sebastian KlähnandSeptias 0751cc50b9 api(json-rpc): force stickers to be sent as stickers (#4819)
This approach uses a param field to enable forcing the sticker
`viewtype`. The first commit has the memory-only flag implemented, but
this flag is not persistent through the database conversion needed for
draft/undraft. That's why `param` has to be used.

follow up to #4814 
fixes #4739

---------

Co-authored-by: Septias <scoreplayer2000@gmail.comclear>
2023-10-14 08:34:46 +00:00
link2xt 275791595c Merge tag 'v1.124.0' 2023-10-04 21:14:17 +00:00
link2xt 7c4bcf9004 api!: deprecate get_next_media() 2023-10-03 16:08:25 +00:00
link2xt 59a3bc0ff4 Merge tag 'v1.123.0' 2023-09-22 22:41:08 +00:00
iequidoo 676f311f97 fix: lookup_chat_by_reply(): Skip not fully downloaded and undecipherable messages (#4676)
Such a message may be assigned to a wrong chat (e.g. undecipherable group msgs often get assigned to
the 1:1 chat with the sender). Add `DownloadState::Undecipherable` so that messages referencing
undecipherable ones don't go to that wrong chat too. Also do not reply to not fully downloaded
messages. Before `Message.error` was checked for that purpose, but a message can be error for many
reasons.
2023-09-18 14:55:56 +00:00
link2xt 790e867af0 Merge tag 'v1.122.0' 2023-09-12 18:04:05 +00:00
link2xt 2939de013b api(jsonrpc): return only chat IDs for similar chats
This is already the way `get_chatlist_entries` works.

`get_similar_chatlist_entries` is renamed into
`get_similar_chat_ids` because return values are not entries anymore.
2023-09-08 18:47:31 +00:00
link2xt dcbf5996c2 Merge tag 'v1.121.0' 2023-09-06 21:46:07 +00:00
link2xt 30024abb6c feat: add API to get similar chats 2023-09-05 16:47:19 +00:00
Simon Laux d07c743cdc api(jsonrpc): add resend_messages 2023-08-24 22:04:47 +00:00
link2xt e12044e6af api!(deltachat-jsonrpc): use kind as a tag for all union types 2023-08-03 23:46:24 +00:00
link2xt aecbebd566 docs: improve JSON-RPC API documentation 2023-08-03 16:06:36 +00:00