-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
test: add group consistency bug test #6021
base: main
Are you sure you want to change the base?
Conversation
e837ced
to
d1595c0
Compare
remove_contact_from_chat(alice, alice_chat_id, alice_fiona_contact_id).await?; | ||
let _alice_sent_add_msg = alice.pop_sent_msg().await; | ||
|
||
SystemTime::shift(Duration::from_secs(3600)); |
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 problem with the logic introduced in #5376 is that it assumes that if I think instead of The logic is completely contained here, could be reordered to first try to find the parent and then use its timestamp instead of deltachat-core-rust/src/receive_imf.rs Lines 2104 to 2145 in 46922d4
|
The problem is that the referenced message might be also sent being offline, or by another user not having recent messages in the chat. EDIT: The solution from #5376 (comment) should fix the observed bug as well, but it requires adding a new column |
But at least, assuming everyone's clock is in sync and message delivery is instant once user gets online, if you receive a message referencing parent message that has sent timestamp x, you can tell user has downloaded all messages that were delivered up to time x. If membership changed last time at time y < x, then user was up to date, otherwise you cannot trust them with membership changes. EDIT: If this logic is sufficient to fix this particular test case without breaking other test cases we already have, then I'd rather implement it instead of adding new columns, and close the issue (well, PR) until we hit another problem in real chats. |
It's not clear whether the user downloaded all messages if the user's message reference only their previous messages because currently we add to References |
d1595c0
to
5176025
Compare
5176025
to
7e693e8
Compare
let sync_member_list = member_list_ts
.filter(|t| *t <= mime_parser.timestamp_sent)
.is_some(); This is the code because of which the new test fails (Fiona is "synced back"). We can change it to look not at |
If looking at the parent timestamp fixes the test without breaking other tests then it's good enough to close this PR/issue until we get another problem in a real group chat. I would also not add any conditions like "is it another member message", if the message referenced is |
I just want to say that looking at the parent message timestamp apparently doesn't fix the problem because Bob in this test can send two messages while being offline and the second message would have as a parent the first one (if Bob is offline, his first message would be |
No description provided.