deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
638 stars 82 forks source link

Mailing list messages not marked as read in second device while read in first device #3386

Closed adbenitez closed 2 years ago

adbenitez commented 2 years ago

I have several mailing lists from delta chat's github repositories that I watch, on my phone when I open one of these mailing lists, the messages are marked as read, but then in PC the badge counter doesn't goes down/disappear, and the same if I open the chat in PC, in android the messages are not marked as read, on the other hand, if it is a group or private chat the chat badges are synchronized

link2xt commented 2 years ago

Seen flag synchronization was introduced in #2942. It works by marking the messages as \\Seen on IMAP and detecting it on the other device.

Detection works reliably. I selected Inbox in Thunderbird and clicked "Mark Folder Read" in context menu. Delta Chat immediately marked all messages in mailing lists as read and badges disappeared.

Before doing that, I found some messages that are not marked as read and found them in Delta Chat. They had Seen status in message info. It means the bug is somewhere in the code marking messages as seen on IMAP. Maybe somewhere in #3223 code.

link2xt commented 2 years ago

Maybe the problem is add_flag_finalized_with_set not caring about whether OK is received or not.

gerryfrancis commented 2 years ago

The same issue is valid for system messages, too.

link2xt commented 2 years ago

The same issue is valid for system messages, too.

What is a system message? Some kind of messages like NDNs are never marked as read, but it's a different bug, it's fully reproducible.

Mailing lists are marked as read most of the time, but sometimes don't even when the message is Seen already.

gerryfrancis commented 2 years ago

What is a system message?

@link2xt Maybe I used the wrong term for messages like "member [...] added to/removed from group" and Webxdc status update messages, sorry about that, but they are not marked as read either: https://github.com/deltachat/deltachat-core-rust/issues/3054

link2xt commented 2 years ago

@adbenitez Does this happen when the mailing list is accepted? Maybe it's because you keep it being a contact request?

adbenitez commented 2 years ago

@link2xt I just tested, the mailing list are accepted, and it worked, but figured out the issue:

I was opening mailing lists with unread messages older than one week and I have my DC set to delete after one week, since there is no message to mark as read in my INBOX that is why they were not synced, so closing this since there is no real issue