-
Notifications
You must be signed in to change notification settings - Fork 96
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
base: main
Are you sure you want to change the base?
Fix group renaming #6699
Conversation
2f0ac1d
to
704729f
Compare
There was a problem hiding this 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"]: |
There was a problem hiding this comment.
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
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
for name in ["Baz", "Foo bar", "Bar", "Baz", "Xyzzy", "aaa", "quux"]: | |
for name in ["Baz", "Foo bar", "Bar"]: |
// If the change is received from the sync message, | ||
// do not update timestamp. It may be long after | ||
// the group is promoted. |
There was a problem hiding this comment.
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)
The bug is not about sync messages. Alice is sending old timestamp so the group name is not updated for Bob. |
Fixes #6697
Based on #6698