fix imap uid fetch
This commit is contained in:
@@ -128,7 +128,6 @@ class DirectoryTreeStorage implements Storage
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Test.
|
||||
* @inheritDoc
|
||||
* @noinspection PhpRedundantCatchClauseInspection
|
||||
*/
|
||||
@@ -156,6 +155,13 @@ class DirectoryTreeStorage implements Storage
|
||||
throw new ImapError($e->getMessage(), previous: $e);
|
||||
}
|
||||
|
||||
// May return wrong items. Do not return one with matching id.
|
||||
$output = array_filter($output, fn ($it) => $it > $id);
|
||||
$output = array_values($output);
|
||||
|
||||
// Otherwise, it's in reverse order.
|
||||
sort($output);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -188,6 +194,9 @@ class DirectoryTreeStorage implements Storage
|
||||
throw new ImapError($e->getMessage(), previous: $e);
|
||||
}
|
||||
|
||||
// Otherwise, it's in reverse order.
|
||||
sort($output);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user