From ee6a76a35c5570cd4fcc64b7bc57dcfb8d651120 Mon Sep 17 00:00:00 2001 From: julian laplace Date: Fri, 27 Mar 2026 15:24:30 +0100 Subject: fix body encoding --- bucky/app/bucky.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index 3e76e9b..a16fe37 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -815,12 +815,7 @@ var bucky = (module.exports = { return; } res.message = message; - - // Fix mail body encoding ... - const body = res.message.get("body"); - if (body instanceof Buffer) { - res.message.set("body", body.toString("utf8")); - } + res.message.set("body", res.message.get("body").toString()); next(); }); }, @@ -860,7 +855,7 @@ var bucky = (module.exports = { recipient: recipient, date: util.now(), subject: subject, - body: body, + body: body.toString(), }; var senderMessage = { mbox: sender + ".outbox", @@ -869,7 +864,7 @@ var bucky = (module.exports = { recipient: recipient, date: util.now(), subject: subject, - body: body, + body: body.toString(), }; Promise.all([ db.createMessage(recipientMessage), -- cgit v1.2.3-70-g09d2