From c68244692d72087c9835a051b4c2949ed2c7de93 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 22 Oct 2025 16:12:17 +0000 Subject: [PATCH] api(jsonrpc): restore `protect` argument for create_group_chat It was removed in 498a8318734de4a11bed6f31a7a1fd36e385e705 Restoring as optional argument to avoid breaking compatibility. --- deltachat-jsonrpc/src/api.rs | 10 +++++++++- .../src/deltachat_rpc_client/account.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/deltachat-jsonrpc/src/api.rs b/deltachat-jsonrpc/src/api.rs index 5171e2a14..3af97db87 100644 --- a/deltachat-jsonrpc/src/api.rs +++ b/deltachat-jsonrpc/src/api.rs @@ -993,7 +993,15 @@ impl CommandApi { /// /// To check, if a chat is still unpromoted, you can look at the `is_unpromoted` property of `BasicChat` or `FullChat`. /// This may be useful if you want to show some help for just created groups. - async fn create_group_chat(&self, account_id: u32, name: String) -> Result { + /// + /// `protect` argument is deprecated as of 2025-10-22 and is left for compatibility. + /// Pass `false` here. + async fn create_group_chat( + &self, + account_id: u32, + name: String, + _protect: bool, + ) -> Result { let ctx = self.get_context(account_id).await?; chat::create_group(&ctx, &name).await.map(|id| id.to_u32()) } diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/account.py b/deltachat-rpc-client/src/deltachat_rpc_client/account.py index 53d77f7ce..adcccc1dd 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/account.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/account.py @@ -318,7 +318,7 @@ class Account: (see `get_full_snapshot()` / `get_basic_snapshot()`). This may be useful if you want to show some help for just created groups. """ - return Chat(self, self._rpc.create_group_chat(self.id, name)) + return Chat(self, self._rpc.create_group_chat(self.id, name, False)) def create_broadcast(self, name: str) -> Chat: """Create a new **broadcast channel**