Skip to content

Stop relying on group IDs stored in message-IDs #1568

Closed

Description

@link2xt

Some references I have looked up in C core commits: Chat-Group-ID substituted X-MrGrpId in 2017: deltachat/deltachat-core@5c0f205 Read support was introduced in deltachat/deltachat-core@85bf909 X-Mr-GrpId was introduced in deltachat/deltachat-core@34293fd

So, Chat-Group-ID is pretty stable and can be reliably used to identify groups. According to the spec group ID is still stored in the Message-ID "To identify the group-id on replies from normal MUAs".

However, for unknown groups the group ID is not extracted from the message-ID when Chat-Group-ID is not available (because it was not decrypted successfully or not present in the first place): #1565. And for replies to known groups, a corresponding group can be looked up by searching for the parent message in the database.

So, I propose to stop trying to extract the group ID from message-ID, and assign messages to the chat corresponding to the parent message instead.

This would also solve the problem with incompatible COI prefixes, see #1516

Activity

  1. added
    enhancement
    on Jun 6, 2020
  2. hpk42 commented on Jun 8, 2020

    @hpk42
    Contributor

    Searching for the parent message is sensitive to message order, as things stand. But most MUAs preserve a Reference so if we encode the group id into the References header, we have good chances of associating the correct chat. However, the most common form for DC/non-DC communications is probably a 1:1 chat. And those will easily be associated correctly because they have no grpid anyway. So overall, i am in favor of trying to get rid of encoding grpids into Message-IDs. Would be interesting to try removing the grpid-encoding and see which/if any tests fail.

  3. self-assigned this
    on Dec 1, 2020
  4. link2xt commented on Dec 1, 2020

    @link2xt
    CollaboratorAuthor

    In-reply-to is successfully used to find quoted message now, should not be hard to find the corresponding chat and attach to it.

  5. r10s commented on Jan 14, 2021

    @r10s
    Contributor

    maybe it is better not to see this issue as a goal, but more as a possible result of other things that need to be done, eg. #2073.

    i would be fine with leaving the group-id in the message-id, if that helps, maybe only in a few cases (messags out of order).

  6. link2xt commented on Jan 14, 2021

    @link2xt
    CollaboratorAuthor

    First thing I want to do is to process In-Reply-To. If we can reliably drop group ID as a result, we can move it (and In-Reply-To, References etc.) into encrypted headers for protected groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions