do not add extra newline to messages with text body for multipart

This commit is contained in:
Andris Reinman 2017-06-01 19:02:58 +03:00
parent 9534594a7e
commit 40b36fed53
2 changed files with 5 additions and 5 deletions

View file

@ -80,12 +80,13 @@ class Indexer {
next();
};
root = false;
if (node.size || node.attachmentId) {
append(false, true); // force newline
if (!root) {
append(false, true); // force newline
}
size += node.size;
}
root = false;
if (node.boundary) {
append('--' + node.boundary);

View file

@ -37,7 +37,7 @@ class LengthLimiter extends Transform {
if (this.byteCounter < this.startFrom) {
// split the chunk and ignore the first part
chunk = chunk.slice(this.startFrom - this.byteCounter);
this.byteCounter += (this.startFrom - this.byteCounter);
this.byteCounter += this.startFrom - this.byteCounter;
}
// can emit full chunk
@ -69,7 +69,6 @@ class LengthLimiter extends Transform {
}
done();
}
}
module.exports = LengthLimiter;