generated from Nodarx/template
fix: use peak so we don't mark messages as read
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -57,7 +57,7 @@ final class FetchOptions
|
||||
|
||||
public function withHeaders(): self
|
||||
{
|
||||
return $this->with('BODY[HEADER]');
|
||||
return $this->with('BODY.PEEK[HEADER]');
|
||||
}
|
||||
|
||||
public function withHeader(string ...$fields): self
|
||||
@@ -86,12 +86,12 @@ final class FetchOptions
|
||||
|
||||
public function withBodyText(): self
|
||||
{
|
||||
return $this->with('BODY[TEXT]');
|
||||
return $this->with('BODY.PEEK[TEXT]');
|
||||
}
|
||||
|
||||
public function withBody(): self
|
||||
{
|
||||
return $this->with('BODY[]');
|
||||
return $this->with('BODY.PEEK[]');
|
||||
}
|
||||
|
||||
public function withBodySection(string $section): self
|
||||
@@ -102,7 +102,7 @@ final class FetchOptions
|
||||
return $this;
|
||||
}
|
||||
|
||||
return $this->with(sprintf('BODY[%s]', $section));
|
||||
return $this->with(sprintf('BODY.PEEK[%s]', $section));
|
||||
}
|
||||
|
||||
public function with(string $item): self
|
||||
|
||||
@@ -68,7 +68,7 @@ final class CommandExecutor
|
||||
|
||||
$tag = $this->tags->next();
|
||||
$this->writer->write($tag, new RequestFrame(sprintf(
|
||||
'UID FETCH %s (UID BODY[%s])',
|
||||
'UID FETCH %s (UID BODY.PEEK[%s])',
|
||||
$target->sequenceSet()->toCommand(),
|
||||
$section,
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user