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 3 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.

@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)

@Hocuri Hocuri force-pushed the hoc/channels-allow-leave-contact-request branch from b4661be to a8e39cb Compare August 5, 2025 14:50
@Hocuri Hocuri force-pushed the hoc/channels-allow-leave-contact-request branch from a8e39cb to 8ed2a22 Compare August 5, 2025 14:53
@iequidoo
Copy link
Collaborator

iequidoo commented Aug 6, 2025

There was an unmerged PR before that disables attaching profile data in group leave messages: #6813. Now we should do that at least for "Contact Request" groups here. But for me reviving that PR looks better, it's just a more simple approach.
...
Also receive_imf should be fixed. It mustn't try to unblock the chat on an outgoing Group/Broadcast leave message.

@link2xt
Copy link
Collaborator

link2xt commented Aug 7, 2025

Re unmerged PR, I commented in that PR: #6813 (comment)
It should not block merging this PR as we don't have clear rules regarding sharing the avatar and it is not communicated to users when it is shared.

Also receive_imf should be fixed. It mustn't try to unblock the chat on an outgoing Group/Broadcast leave message.

So this PR needs a multi-device test where Alice receives a group as a contact request, leaves it and receives leave message on a second device. Second device should not have the group and contact accepted and new group and direct requests should be received as a contact request.

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