Skip to content

Commit

Permalink
fixup! perf(imap): FETCH only flags for partial message updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesGGE committed Feb 6, 2024
1 parent 3f40cd7 commit ed4f6e7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/IMAP/MessageMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ static function (int $uid) use ($highestKnownUid) {
* @throws ServiceException
*/
public function findFlagsByIds(Horde_Imap_Client_Base $client,
string $mailbox,
$ids,
string $userId,
bool $loadBody = false): array {
string $mailbox,
array|Horde_Imap_Client_Ids $ids,
string $userId,
bool $loadBody = false): array {
$query = new Horde_Imap_Client_Fetch_Query();
$query->uid();
$query->flags();
Expand All @@ -279,7 +279,7 @@ public function findFlagsByIds(Horde_Imap_Client_Base $client,
*/
public function findByIds(Horde_Imap_Client_Base $client,
string $mailbox,
$ids,
array|Horde_Imap_Client_Ids $ids,
string $userId,
bool $loadBody = false): array {
$query = new Horde_Imap_Client_Fetch_Query();
Expand Down Expand Up @@ -312,7 +312,12 @@ public function findByIds(Horde_Imap_Client_Base $client,
* @throws Horde_Mime_Exception
* @throws ServiceException
*/
private function findByQuery(array|Horde_Imap_Client_Ids $ids, Horde_Imap_Client_Fetch_Query $query, string $mailbox, Horde_Imap_Client_Base $client, bool $loadBody, string $userId): array {
private function findByQuery(array|Horde_Imap_Client_Ids $ids,
Horde_Imap_Client_Fetch_Query $query,
string $mailbox,
Horde_Imap_Client_Base $client,
bool $loadBody,
string $userId): array {
if (is_array($ids)) {
// Chunk to prevent overly long IMAP commands
/** @var Horde_Imap_Client_Data_Fetch[] $fetchResults */
Expand Down

0 comments on commit ed4f6e7

Please sign in to comment.