diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2021-02-17 19:48:24 +0300 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2021-02-17 19:59:37 +0300 |
commit | 4ee5217a2f2418578709bff61d50e48e50b3ef1a (patch) | |
tree | 1ee759e1f5124ea775e99d6e6c45079713fd87d8 /lib/Service | |
parent | e679d4e4a9d85ba41433841003950a92b36127e0 (diff) |
Fix envelopes not vanishing on sync
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/Sync/ImapToDbSynchronizer.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Service/Sync/ImapToDbSynchronizer.php b/lib/Service/Sync/ImapToDbSynchronizer.php index d9c55c272..83ed3a5a7 100644 --- a/lib/Service/Sync/ImapToDbSynchronizer.php +++ b/lib/Service/Sync/ImapToDbSynchronizer.php @@ -405,7 +405,13 @@ class ImapToDbSynchronizer { } $perf->step('persist new messages'); - $mailbox->setSyncVanishedToken($client->getSyncToken($mailbox->getName())); + // If a list of UIDs was *provided* (as opposed to loaded from the DB, + // we can not assume that all changes were detected, hence this is kinda + // a silent sync and we don't update the vanish token until the next full + // mailbox sync + if ($knownUids === null) { + $mailbox->setSyncVanishedToken($client->getSyncToken($mailbox->getName())); + } } $this->mailboxMapper->update($mailbox); $perf->end(); |