Skip to content
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

Fix group renaming #6699

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

Fix group renaming #6699

wants to merge 2 commits into from

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Mar 22, 2025

Fixes #6697

Based on #6698

@link2xt link2xt requested review from iequidoo and Hocuri March 22, 2025 15:31
Base automatically changed from link2xt/python-test-vcard to main March 23, 2025 15:45
@link2xt link2xt force-pushed the link2xt/fix-group-renaming branch from 2f0ac1d to 704729f Compare March 23, 2025 15:59
Copy link
Collaborator

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

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

I don't really understand how the fix fixes the test, since the test doesn't even have multiple devices that would send sync messages. Maybe the comment could be improved to explain this better, maybe it's fine.

bob_chat = bob_msg.get_snapshot().chat
assert bob_chat.get_basic_snapshot().name == "Test group"

for name in ["Baz", "Foo bar", "Bar", "Baz", "Xyzzy", "aaa", "quux"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The test takes quite a long time because of the sleeps. The test even reproduced the bug when I replaced this with

Suggested change
for name in ["Baz", "Foo bar", "Bar", "Baz", "Xyzzy", "aaa", "quux"]:
for name in ["Baz", "Foo bar"]:

but to be sure we could also to

Suggested change
for name in ["Baz", "Foo bar", "Bar", "Baz", "Xyzzy", "aaa", "quux"]:
for name in ["Baz", "Foo bar", "Bar"]:

Comment on lines +4218 to +4220
// If the change is received from the sync message,
// do not update timestamp. It may be long after
// the group is promoted.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be good to explain this more extensively, because it took me quite a long time to understand it. E.g.:

            // If the change is received from sync message
            // do not update timestamp. It may be long after
            // the group is promoted.
            // (note that `sync == Nosync` would mean
            //that the change comes from a sync message)

@link2xt
Copy link
Collaborator Author

link2xt commented Mar 24, 2025

I don't really understand how the fix fixes the test, since the test doesn't even have multiple devices that would send sync messages.

The bug is not about sync messages. Alice is sending old timestamp so the group name is not updated for Bob.

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.

Chan-Group-Name-Timestamp header contains the wrong timestamp when changing group name
2 participants