From ba15591c228e3227955521b5ba88686e3da7b4c1 Mon Sep 17 00:00:00 2001 From: missytake Date: Sat, 5 Apr 2025 18:26:22 +0200 Subject: [PATCH 1/4] fix: add missing ChatDeleted event to python jsonrpc client --- deltachat-rpc-client/src/deltachat_rpc_client/const.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/const.py b/deltachat-rpc-client/src/deltachat_rpc_client/const.py index 5268a281c..a72e7cb39 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/const.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/const.py @@ -48,6 +48,7 @@ class EventType(str, Enum): MSG_READ = "MsgRead" MSG_DELETED = "MsgDeleted" CHAT_MODIFIED = "ChatModified" + CHAT_DELETED = "ChatDeleted" CHAT_EPHEMERAL_TIMER_MODIFIED = "ChatEphemeralTimerModified" CONTACTS_CHANGED = "ContactsChanged" LOCATION_CHANGED = "LocationChanged" From 211badee41d90a1ca4651d521f8743fc953222d8 Mon Sep 17 00:00:00 2001 From: missytake Date: Sun, 6 Apr 2025 00:48:24 +0200 Subject: [PATCH 2/4] feat: pass email and password via env in python-jsonrpc --- deltachat-rpc-client/src/deltachat_rpc_client/_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py index 8849e72ea..7b62ba965 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py @@ -1,5 +1,6 @@ import argparse import re +import os import sys from threading import Thread from typing import TYPE_CHECKING, Callable, Iterable, Optional, Tuple, Type, Union @@ -89,8 +90,8 @@ def _run_cli( help="accounts folder (default: current working directory)", nargs="?", ) - parser.add_argument("--email", action="store", help="email address") - parser.add_argument("--password", action="store", help="password") + parser.add_argument("--email", action="store", help="email address", default=os.getenv("DELTACHAT_EMAIL")) + parser.add_argument("--password", action="store", help="password", default=os.getenv("DELTACHAT_PASSWORD"))) args = parser.parse_args(argv[1:]) with Rpc(accounts_dir=args.accounts_dir, **kwargs) as rpc: From 072855daefdf54ef4fda40cbe91837403397b320 Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 7 Apr 2025 22:55:09 +0200 Subject: [PATCH 3/4] fix: syntax --- deltachat-rpc-client/src/deltachat_rpc_client/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py index 7b62ba965..3bd178f18 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py @@ -91,7 +91,7 @@ def _run_cli( nargs="?", ) parser.add_argument("--email", action="store", help="email address", default=os.getenv("DELTACHAT_EMAIL")) - parser.add_argument("--password", action="store", help="password", default=os.getenv("DELTACHAT_PASSWORD"))) + parser.add_argument("--password", action="store", help="password", default=os.getenv("DELTACHAT_PASSWORD")) args = parser.parse_args(argv[1:]) with Rpc(accounts_dir=args.accounts_dir, **kwargs) as rpc: From 3513a97a3d6170e91290533205495ef2fa5b4a11 Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 7 Apr 2025 23:37:44 +0200 Subject: [PATCH 4/4] fix: ruff complains about import sorting --- deltachat-rpc-client/src/deltachat_rpc_client/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py index 3bd178f18..bfbcfc70e 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py @@ -1,6 +1,6 @@ import argparse -import re import os +import re import sys from threading import Thread from typing import TYPE_CHECKING, Callable, Iterable, Optional, Tuple, Type, Union