summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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),