Skip to content

dc_receive_imf: do not create adhoc groups when group ID is known - #1766

Merged
link2xt merged 1 commit into
masterfrom
no-adhoc-with-grpid
Jul 27, 2020
Merged

link2xt merged 1 commit into
masterfrom
no-adhoc-with-grpid

Conversation

@link2xt

@link2xt link2xt commented Jul 26, 2020 •

Copy link
Copy Markdown
Collaborator

Adhoc groups for group messages that don't have Chat-Group-ID are already
created above in another create_or_lookup_adhoc_group.

At this point it could be that there is a valid Chat-Group-ID header,
but no group was created because removed_id was non-zero i.e. received
message removes some group member.

If group was not explicitly left, current code creates an adhoc group
instead of trashing late or reordered messages that remove group
members. Such groups have adhoc group IDs locally, but proper group
message-IDs. Attempts to reply to such groups or leave them creates
"split groups" for all other members of original group. The solution is
not to create adhoc groups in this case.

@link2xt link2xt added the bug label Jul 26, 2020
@link2xt
link2xt force-pushed the no-adhoc-with-grpid branch 2 times, most recently from 1b93b82 to 092e3a1 Compare July 27, 2020 09:54
@Hocuri

Hocuri commented Jul 27, 2020

Copy link
Copy Markdown
Collaborator

But why do we return DC_CHAT_ID_TRASH, not 0? DC_CHAT_ID_TRASH means that the message will not be shown at all. I guess that this also is why the test fails.

Adhoc groups for group messages that don't have Chat-Group-ID are already
created above in another create_or_lookup_adhoc_group.

At this point it could be that there is a valid Chat-Group-ID header,
but no group was created because removed_id was non-zero i.e. received
message removes some group member.

If group was not explicitly left, current code creates an adhoc group
instead of trashing late or reordered messages that remove group
members. Such groups have adhoc group IDs locally, but proper group
message-IDs.  Attempts to reply to such groups or leave them creates
"split groups" for all other members of original group. The solution is
not to create adhoc groups in this case.
@link2xt
link2xt force-pushed the no-adhoc-with-grpid branch from 092e3a1 to a45f651 Compare July 27, 2020 11:18
@link2xt

link2xt commented Jul 27, 2020

Copy link
Copy Markdown
Collaborator Author

I fixed the failing test. Related PR: #1566

@Hocuri Hocuri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Lgtm now, but maybe @hpk42 or @dignifiedquire should have a look, too

@r10s r10s left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@r10s r10s mentioned this pull request Jul 27, 2020
@link2xt
link2xt merged commit 82c3352 into master Jul 27, 2020
@link2xt
link2xt deleted the no-adhoc-with-grpid branch July 27, 2020 17:23
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