summaryrefslogtreecommitdiff
path: root/bucky
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2026-03-27 15:24:30 +0100
committerjulian laplace <julescarbon@gmail.com>2026-03-27 15:24:30 +0100
commitee6a76a35c5570cd4fcc64b7bc57dcfb8d651120 (patch)
treeb720d408b1607c88ac8f6db22ef76cd2ee93871d /bucky
parentd23c6dff28491333ff5ea092ad564f35390dc9a7 (diff)
fix body encoding
Diffstat (limited to 'bucky')
-rw-r--r--bucky/app/bucky.js11
1 files 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),