sync-engine icon indicating copy to clipboard operation
sync-engine copied to clipboard

Removing inbox and unread tags simultaneously doesn't mark email as read on IMAP

Open thomasst opened this issue 10 years ago • 6 comments
trafficstars

Steps to reproduce:

  1. Have a thread consisting of one single unread message in your inbox on an (non-Gmail) IMAP server (e.g. Dovecot)
  2. Issue the following PUT request to the Nylas thread: {"remove_tags": ["inbox", "unread"]}
  3. Nylas will queue two actions: archive and mark_read. The syncback process will first archive the email as expected, and then try to mark the thread as read. However, inbox.actions.backends.generic.set_remote_unread still thinks the email is in the INBOX folder and won't be able to mark the email as read.

thomasst avatar May 30 '15 21:05 thomasst

Thanks for the report. We're thinking of fixing this by having the syncback process update local UID state when an action completes, which should be straightforward at least for servers that support UIDPLUS. Probably as part of work to also address #143.

emfree avatar Jun 04 '15 05:06 emfree

Sounds good. I've also run into this problem when archiving a message and then unarchiving it quickly afterwards (on IMAP). The message wouldn't be unarchived.

thomasst avatar Jun 06 '15 01:06 thomasst

@thomasst is this still an issue with the new labels+folders API?

grinich avatar Aug 04 '15 22:08 grinich

This is still an issue and applying tags in succession (I tested the legacy API) leaves Nylas in a permanently inconsistent state.

thomasst avatar Aug 13 '15 00:08 thomasst

@thomasst I meant, is it an issue that is also presented in the labels/folders APIs?

grinich avatar Aug 13 '15 00:08 grinich

Yes. It's still an issue with the latest master. If I PUT {"unread": false, "folder_id": some_folder_id}, then the thread is sometimes not marked as read. If I issue two requests separately (first marking as read and then setting the folder ID), it works fine.

thomasst avatar Jan 05 '16 19:01 thomasst