Skip to content
Snippets Groups Projects
Unverified Commit acb00eef authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Do not compare apples and pears during the mailbox sync


The sync was comparing IDs with message UIDs, hence it occasionally told
the client that all known messages vanished. On the next sync request it
said everything that just vanished was suddenly a new message.

Signed-off-by: default avatarChristoph Wurst <christoph@winzerhof-wurst.at>
parent fbb4b0ee
No related branches found
No related tags found
No related merge requests found
......@@ -145,13 +145,15 @@ class SyncService {
if ($query !== null) {
// Filter new messages to those that also match the current filter
$newIds = $this->messageMapper->findIdsByQuery($mailbox, $query, null, $newIds);
$newUids = $this->messageMapper->findUidsForIds($mailbox, $newIds);
$newIds = $this->messageMapper->findIdsByQuery($mailbox, $query, null, $newUids);
}
$new = $this->messageMapper->findByIds($newIds);
// TODO: $changed = $this->messageMapper->findChanged($mailbox, $uids);
if ($query !== null) {
$changedIds = $this->messageMapper->findIdsByQuery($mailbox, $query, null, $knownIds);
$changedUids = $this->messageMapper->findUidsForIds($mailbox, $knownIds);
$changedIds = $this->messageMapper->findIdsByQuery($mailbox, $query, null, $changedUids);
} else {
$changedIds = $knownIds;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment