From 294e23d82da861a120f9ec6f0e94eb0ca8b7c971 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Tue, 23 Dec 2025 06:21:09 -0300 Subject: [PATCH] docs: delete_chat(): Don't lie that messages aren't deleted from server Messages are actually deleted from the server. I've checked this in Desktop. --- deltachat-ffi/deltachat.h | 2 +- deltachat-jsonrpc/src/api.rs | 4 ++-- src/chat.rs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 76c26cfaa..6f5f120cb 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1611,10 +1611,10 @@ void dc_set_chat_visibility (dc_context_t* context, uint32_t ch * * Messages are deleted from the device and the chat database entry is deleted. * After that, the event #DC_EVENT_MSGS_CHANGED is posted. + * Messages are deleted from the server in background. * * Things that are _not_ done implicitly: * - * - Messages are **not deleted from the server**. * - The chat or the contact is **not blocked**, so new messages from the user/the group may appear * and the user may create the chat again. * - **Groups are not left** - this would diff --git a/deltachat-jsonrpc/src/api.rs b/deltachat-jsonrpc/src/api.rs index 36821b610..2eef86ad0 100644 --- a/deltachat-jsonrpc/src/api.rs +++ b/deltachat-jsonrpc/src/api.rs @@ -795,11 +795,11 @@ impl CommandApi { /// Delete a chat. /// /// Messages are deleted from the device and the chat database entry is deleted. - /// After that, the event #DC_EVENT_MSGS_CHANGED is posted. + /// After that, a `MsgsChanged` event is emitted. + /// Messages are deleted from the server in background. /// /// Things that are _not done_ implicitly: /// - /// - Messages are **not deleted from the server**. /// - The chat or the contact is **not blocked**, so new messages from the user/the group may appear as a contact request /// and the user may create the chat again. /// - **Groups are not left** - this would diff --git a/src/chat.rs b/src/chat.rs index 533cf8c76..25f679914 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -600,6 +600,10 @@ impl ChatId { } /// Deletes a chat. + /// + /// Messages are deleted from the device and the chat database entry is deleted. + /// After that, a `MsgsChanged` event is emitted. + /// Messages are deleted from the server in background. pub async fn delete(self, context: &Context) -> Result<()> { self.delete_ex(context, Sync).await }