-
-
Notifications
You must be signed in to change notification settings - Fork 106
fix: Order of messages if Sentbox is synced before Inbox (#7169) #7177
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
Conversation
79418b5
to
54fe9b5
Compare
so this one now changes (and potentially complicates and slow down) sql statement? also state in the database is no longer the onr reported in the api? i do not get it - and the missing reasoning is also not helpful :) please always add reasoning and some lines what a pr does to the pr description - even of it is repeared from somewhere else why not remove "warch sent folder" first, which is a clear way forward, and was agreed on. even if not does not catch all cases, it removes compexity and on previous discussions the issue at hand |
54fe9b5
to
5438610
Compare
This fixes a Gmail-like scenario when outgoing messages are saved to Sentbox as well and it is fetched before Inbox by chance, by allowing received outgoing messages to mingle with fresh incoming ones. The reason is that a received outgoing message may be a reply (explicit or implicit) to an incoming message received later, so it's better to sort them together purely by timestamp. Another case is the user sharing their account with someone else (using another device) or having some auto-reply bot. This fixes the described scenarios w/o introducing a new message state for outgoing messages because locally sent ones have zero `timestamp_sent`, so we can filter them in `calc_sort_timestamp()`. As for messages sent locally, there's no need to make them more noticeable even if they are newer, so received outgoing messages are added after them.
5438610
to
c8af189
Compare
Improved the commit message and added it to the PR description.
This SQL query already looks at
Sure, this will help in the most cases and i'm going to do that probably after optimizing the mentioned SQL query. But simplifying/dropping
This PR doesn't change anything here, but |
it is about dropping, and that is simple. most work is in adapting the python tests (i am not really into python, otherwise if would have done that already :) my point is that subsequent things things are clearer to discuss if the noise of SentboxWatch (and ideally "upload to Sentbox via imap") is gone and we have some states less to take care for |
Not sure this should be merged, delayed incoming messages may be sorted above received outgoing messages and thus will be less visible. Will reopen if i have an idea how to fix this |
Replacement for #5813 (github doesn't allow to reopen it).
Fix #7169
This fixes a Gmail-like scenario when outgoing messages are saved to Sentbox as well and it is
fetched before Inbox by chance, by allowing received outgoing messages to mingle with fresh incoming
ones. The reason is that a received outgoing message may be a reply (explicit or implicit) to an
incoming message received later, so it's better to sort them together purely by timestamp. Another
case is the user sharing their account with someone else (using another device) or having some
auto-reply bot.
This fixes the described scenarios w/o introducing a new message state for outgoing messages because
locally sent ones have zero
timestamp_sent
, so we can filter them incalc_sort_timestamp()
.As for messages sent locally, there's no need to make them more noticeable even if they are newer,
so received outgoing messages are added after them.