diff options
| author | julian laplace <julescarbon@gmail.com> | 2026-03-27 15:14:43 +0100 |
|---|---|---|
| committer | julian laplace <julescarbon@gmail.com> | 2026-03-27 15:14:43 +0100 |
| commit | d23c6dff28491333ff5ea092ad564f35390dc9a7 (patch) | |
| tree | 95a7c66daba43952c87cfb20dfbcc3c508e59e78 /bucky | |
| parent | e59842e76962c309bdbfc5c65bed2295f4bbf278 (diff) | |
fix body encoding
Diffstat (limited to 'bucky')
| -rw-r--r-- | bucky/app/bucky.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index 81171f4..3e76e9b 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -92,7 +92,7 @@ var bucky = (module.exports = { res.threads_ids = threads.pluck("id").sort(); res.keywords = _.uniq(threads.pluck("keyword")); next(); - }) + }), ); } else if (query.thread) { db.getThread(query.thread).then((thread) => @@ -110,7 +110,7 @@ var bucky = (module.exports = { res.threads_ids = [query.thread]; res.keywords = [thread.get("keyword")]; next(); - }) + }), ); } else { Promise.all([ @@ -413,7 +413,7 @@ var bucky = (module.exports = { res.sendStatus(404); } db.getTopThreadsForUser(username, limit, offset).then(function ( - top_threads + top_threads, ) { res.topThreads = top_threads; res.topThreads_ids = res.topThreads.pluck("id").sort(); @@ -794,7 +794,7 @@ var bucky = (module.exports = { req.user.get("username"), req.params.box, limit, - offset + offset, ).then(function (messages) { res.messages = messages; res.query = { limit, offset }; @@ -815,6 +815,12 @@ 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")); + } next(); }); }, |
