Files
chatmail-core/deltachat-rpc-client
iequidoo 6dc7f5064a feat: Mark reactions as IMAP-seen in marknoticed_chat() (#6210)
When a reaction notification is shown in the UIs, there's an option "Mark Read", but the UIs are
unaware of reactions message ids, so the UIs just call `marknoticed_chat()` in this case. We don't
want to introduce reactions message ids to the UIs (at least currently), but let's make received
reactions `InFresh` so that the existing `\Seen` flag synchronisation mechanism works for them, and
mark the last fresh hidden incoming message (reaction) in the chat as seen in
`chat::marknoticed_chat()` to trigger emitting `MsgsNoticed` on other devices.

There's a problem though that another device may have more reactions received and not yet seen
notifications are removed from it when handling `MsgsNoticed`, but the same problem already exists
for "usual" messages, so let's not solve it for now.
2025-01-03 21:20:06 -03:00
..

Delta Chat RPC python client

RPC client connects to standalone Delta Chat RPC server deltachat-rpc-server and provides asynchronous interface to it.

Getting started

To use Delta Chat RPC client, first build a deltachat-rpc-server with cargo build -p deltachat-rpc-server or download a prebuilt release. Install it anywhere in your PATH.

Create a virtual environment if you don't have one already and activate it.

$ python -m venv env
$ . env/bin/activate

Install deltachat-rpc-client from source:

$ cd deltachat-rpc-client
$ pip install .

Testing

  1. Build deltachat-rpc-server with cargo build -p deltachat-rpc-server.
  2. Install tox pip install -U tox
  3. Run CHATMAIL_DOMAIN=nine.testrun.org PATH="../target/debug:$PATH" tox.

Additional arguments to tox are passed to pytest, e.g. tox -- -s does not capture test output.

Using in REPL

Setup a development environment:

$ tox --devenv env
$ . env/bin/activate
$ python
>>> from deltachat_rpc_client import *
>>> rpc = Rpc()
>>> rpc.start()
>>> dc = DeltaChat(rpc)
>>> system_info = dc.get_system_info()
>>> system_info["level"]
'awesome'
>>> rpc.close()