mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
Found and fixed a bug while investigating https://github.com/chatmail/core/issues/6656. It's not the same bug, though. Steps to reproduce this bug: - Create a new profile - Transfer it to a second device - Send a message from the first device - -> It will never arrive on the second device, instead a warning will be printed that you are using DC on multiple devices. The bug was that the key wasn't created before the backup transfer, so that the second device then created its own key instead of using the same key as the first device. In order to regression-test, this PR now changes `clone()` to use "Add second device" instead of exporting and importing a backup. Exporting and importing a backup has enough tests already. This PR also adds an unrelated test `test_selfavatar_sync()`. The bug was introduced by https://github.com/chatmail/core/pull/6574 in v1.156.0
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
- Build
deltachat-rpc-serverwithcargo build -p deltachat-rpc-server. - Install tox
pip install -U tox - 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()