Skip to content

feat: Remove imap::Session::sync_seen_flags()#7758

Open
iequidoo wants to merge 3 commits intomainfrom
iequidoo/rm-sync_seen_flags
Open

feat: Remove imap::Session::sync_seen_flags()#7758
iequidoo wants to merge 3 commits intomainfrom
iequidoo/rm-sync_seen_flags

Conversation

@iequidoo
Copy link
Copy Markdown
Collaborator

@iequidoo iequidoo commented Jan 20, 2026

Close #7742

Maybe we should merge this first and then #7928 will be easier to debug, maybe it will reproduce more stably or, vice versa, disappear at all.

However, there's a problem (maybe): with this change, messages will start to arrive always unseen and then be marked as seen as soon as MDNs are received, this will probably cause notifications to appear and then disappear quickly if messages have been already seen on another device. We still store \Seen flags on IMAP.

@iequidoo iequidoo marked this pull request as draft January 20, 2026 21:33
@iequidoo iequidoo force-pushed the iequidoo/rm-sync_seen_flags branch from 266cc9f to 397de34 Compare January 20, 2026 21:34
@iequidoo iequidoo force-pushed the iequidoo/rm-sync_seen_flags branch 2 times, most recently from 3955b41 to 91ea007 Compare March 6, 2026 14:20
@iequidoo iequidoo changed the title Try removing imap::Session::sync_seen_flags() feat: Remove imap::Session::sync_seen_flags() Mar 6, 2026
@iequidoo iequidoo marked this pull request as ready for review March 6, 2026 14:47
@iequidoo iequidoo force-pushed the iequidoo/rm-sync_seen_flags branch 4 times, most recently from 15feacb to dcbfecc Compare March 17, 2026 11:45
@iequidoo

This comment was marked as outdated.

@iequidoo iequidoo force-pushed the iequidoo/rm-sync_seen_flags branch from dcbfecc to 6dbd1ae Compare March 25, 2026 03:09
@iequidoo

This comment was marked as resolved.

@iequidoo iequidoo force-pushed the iequidoo/rm-sync_seen_flags branch 2 times, most recently from d83f90d to b25b500 Compare March 31, 2026 17:08
@iequidoo
Copy link
Copy Markdown
Collaborator Author

iequidoo commented Apr 2, 2026

#8064 should be merged first, test_no_old_msg_is_fresh failed for two configurations here. Not sure this is related to this PR however.

EDIT: Added it as a first commit so that the tests pass.

iequidoo added 3 commits April 2, 2026 11:47
…efore sending outgoing one

We don't want to send an outgoing message from the 2nd device (`ac1_clone`) before receiving the
incoming one and expect that the messages will be ordered correctly on the 1st device (`ac1`). Let's
ensure the correct message order locally in the first place. I checked logs of a failed test run and
it indeed happened that `ac1_clone` sent the message earlier, so it can't reference the incoming
message and `tweak_sort_timestamp()` does nothing on `ac1`, so the messages can't be ordered
correctly considering that smeared clocks on the devices are diferent.
This way they also can be processed by `markseen_msgs()` resulting in self-MDNs which improves
multi-device synchronization. MDNs to contacts won't really be sent because silent group changes
messages are self-removal messages which don't request MDNs.
@iequidoo iequidoo force-pushed the iequidoo/rm-sync_seen_flags branch from b25b500 to d68cee9 Compare April 2, 2026 14:47
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.

Remove sync_seen_flags() eventually

1 participant