mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:07:44 +00:00
LibIMAP: Implement serializing FetchCommands with PeekBody type
This commit is contained in:
parent
b5bfe732d7
commit
2132e0f1bb
1 changed files with 4 additions and 2 deletions
|
@ -74,10 +74,12 @@ DeprecatedString FetchCommand::DataItem::serialize() const
|
||||||
case DataItemType::UID:
|
case DataItemType::UID:
|
||||||
return "UID";
|
return "UID";
|
||||||
case DataItemType::PeekBody:
|
case DataItemType::PeekBody:
|
||||||
TODO();
|
|
||||||
case DataItemType::BodySection: {
|
case DataItemType::BodySection: {
|
||||||
StringBuilder sb;
|
StringBuilder sb;
|
||||||
sb.appendff("BODY[{}]", section.value().serialize());
|
if (type == DataItemType::BodySection)
|
||||||
|
sb.appendff("BODY[{}]", section.value().serialize());
|
||||||
|
else
|
||||||
|
sb.appendff("BODY.PEEK[{}]", section.value().serialize());
|
||||||
if (partial_fetch) {
|
if (partial_fetch) {
|
||||||
sb.appendff("<{}.{}>", start, octets);
|
sb.appendff("<{}.{}>", start, octets);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue