core icon indicating copy to clipboard operation
core copied to clipboard

Synchronize Seen status for contact requests

Open link2xt opened this issue 3 years ago • 0 comments

Currently markseen_msgs creates MarkseenMsgOnImap job only if the chat is unblocked: https://github.com/deltachat/deltachat-core-rust/blob/cccdc51ad40f7c28447b00aff685f108a29976aa/src/message.rs#L1333 Because of this, if you read the contact request chat on one device, the messages are not marked as Seen on IMAP and are not marked as seen on other devices. This is a problem because if you read the contact request on desktop and decide not to accept it (do nothing or block/delete it), your phone keeps blinking the LED.

The reason for not marking the messages as Seen is because Seen flag is also used as an indicator for whether the MDN was sent, similar to $MDNSent flag which is not supported by all IMAP servers, so DC does not set Seen until it decides whether to send MDN or not.

Partial solution for non-DC messages is to mark the message as Seen on IMAP if MDN is not requested.

One possible solution is to mark the messages as Seen on IMAP for contact requests when the messages are seen locally even without sending MDNs, but on the second device in imap::sync_seen_flags only mark the message as noticed if it is Seen on IMAP. This way MDNs will be sent twice for the first messages received before the contact request was accepted.

link2xt avatar Feb 01 '22 08:02 link2xt