Fix https://github.com/chatmail/core/issues/8250. Not sure why anyone would tamper with the link, but maybe the name gets ellipsized because it is very long, or maybe we decide to ellipsize more aggressively in the future. The fix is easy enough, just set the GroupNameTimestamp when creating the channel, so that `HeaderDef::ChatGroupNameTimestamp` gets set when sending a message and the logic in `apply_chat_name_avatar_and_description_changes()` recognizes the incoming name's timestamp as newer than `chat_group_name_timestamp` (which is 0 right after joining a chat). The test is somewhat hacky and depends on the title being the last parameter in the invite code URL, but this is fine; if we ever change that, then the test will fail and we need to modify it. This also removes some wrong doc comments. Since groups are unpromoted until sending a first message, the same fix isn't needed for groups.
Delta Chat RPC python client
RPC client connects to standalone Delta Chat RPC server deltachat-rpc-server
and provides asynchronous interface to it.
rpc.start() performs a health-check RPC call to verify the server
started successfully and will raise an error if startup fails
(e.g. if the accounts directory could not be used).
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=ci-chatmail.testrun.org PATH="../target/debug:$PATH" tox.
Additional arguments to tox are passed to pytest, e.g. tox -- -s does not capture test output.
Activating current checkout of deltachat-rpc-client and -server for development
Go to root repository directory and run:
$ scripts/make-rpc-testenv.sh
$ source venv/bin/activate
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()