Skip to content

feat: Allow leaving a 'Contact Request' channel/group #7007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Jul 16, 2025

A long time ago, we decided that it should not be possible to send a 'Leave' message into a Contact Request group. The reasoning was: Maybe this comes from a spammer, and sending a 'Leave' message would let the spammer know that this account exists and is read by a human. Since channels are using the same code path for leaving, it's similarly not possible to leave a channel contact request.

However:

  • we're mostly using chatmail, where the spam argument carries less weight, because the spam protection works via only allowing encrypted messages (and if a spammer has your addr+key, you will likely need to change profiles, anyways - they will be able to send a lot of spam without worrying about hitting any limits).
  • It won't be possible to leave unencrypted groups, anyways.
  • on Desktop, there is a 'Leave' button for group contact requests, and it just doesn't do anything there

So, this PR proposes to change this logic, and to allow sending a 'Leave' message into contact request chats.

(FTR, discussion started at deltachat/deltachat-ios#2769 (comment))

Assuming we merge this PR, at some point we should adapt Android and Desktop to show this button for contact requests, but I'll write a list of things that should be adapted before making channels non-experimental, no need to do this right now.

Copy link
Collaborator

@iequidoo iequidoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok if "Leave" is renamed to "Send leave message" or smth like this. Otherwise it can leak other metadata, not only the public key.

Also it'd good to add the reasoning from the PR description to the commit message.

@@ -2908,7 +2908,11 @@ async fn prepare_send_msg(
CantSendReason::ProtectionBroken | CantSendReason::ContactRequest => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe split this into separate branches to not mix different cases? ProtectionBroken isn't related to leaving groups/broadcasts here

@link2xt
Copy link
Collaborator

link2xt commented Jul 17, 2025

It won't be possible to leave unencrypted groups, anyways.

Why? Is there any protection against this in the core?

@Hocuri
Copy link
Collaborator Author

Hocuri commented Jul 18, 2025

Why? Is there any protection against this in the core?

No, only in the UIs IIRC. But for every user of chatmail-core that's not a UI (esp. bots), contact requests don't matter that much, anyway.

@Hocuri
Copy link
Collaborator Author

Hocuri commented Jul 18, 2025

It's ok if "Leave" is renamed to "Send leave message" or smth like this. Otherwise it can leak other metadata, not only the public key.

I don't think we should rename this button; if we say that leaking this metadata is too big of a problem, then we shouldn't merge this PR.

Not sure which metadata is leaked exactly; it's true that it wouldn't be nice if the avatar, bio, and display name were leaked.

(BTW, this is not urgent. It has been impossible to leave contact request groups for ages, and channels are experimental, so, no need to rush this into 2.0; we can concentrate on other things first)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants