Skip to content

Commit 85d751d

Browse files
committed
Ask for header first instead of body
1 parent 2af8c99 commit 85d751d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/MessageQuery.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,18 +269,18 @@ protected function fetch(Collection $messages): array
269269
$fetch[] = 'RFC822.SIZE';
270270
}
271271

272-
if ($this->fetchBody) {
273-
$fetch[] = $this->fetchAsUnread
274-
? 'BODY.PEEK[TEXT]'
275-
: 'BODY[TEXT]';
276-
}
277-
278272
if ($this->fetchHeaders) {
279273
$fetch[] = $this->fetchAsUnread
280274
? 'BODY.PEEK[HEADER]'
281275
: 'BODY[HEADER]';
282276
}
283277

278+
if ($this->fetchBody) {
279+
$fetch[] = $this->fetchAsUnread
280+
? 'BODY.PEEK[TEXT]'
281+
: 'BODY[TEXT]';
282+
}
283+
284284
if (empty($fetch)) {
285285
return $uids->mapWithKeys(fn (string|int $uid) => [
286286
$uid => [

0 commit comments

Comments
 (0)