Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: delete messages on IMAP when deleting chat (#6613)
this PR deletes all known messages belonging to a chat when the chat is deleted. this may not be an exhaustive list as a client might not know all message-ids (eg. when using different times for "delete from device"). in this case, other devices may know more IDs. otherwise, the chatmail server will eventually clean up at some point. for non-chatmail, this is up to the user then. the deletion sql commands were inspired by [`delete_msgs_ex`](https://github.com/chatmail/core/blob/main/src/message.rs#L1743) (in fact, [a first try](https://github.com/chatmail/core/compare/r10s/clear-chat-on-delete) was adapting that part, however, that seems less performant as lots of sql commands are needed) successor of #5007
- Loading branch information