From aab1b4a81a15ecad1d962856dc98692994860c12 Mon Sep 17 00:00:00 2001 From: "Isaac (eartharoid)" Date: Sun, 15 Nov 2020 22:52:43 +0000 Subject: [PATCH] Fixed archive issues with emoji --- package-lock.json | 7 +------ src/modules/archive.js | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 303369d..b111a2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@eartharoid/discordtickets", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1527,11 +1527,6 @@ "type-check": "~0.4.0" } }, - "line-reader": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/line-reader/-/line-reader-0.4.0.tgz", - "integrity": "sha1-F+RIGNoKwzVnW6MAlU+U72cOZv0=" - }, "lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", diff --git a/src/modules/archive.js b/src/modules/archive.js index 4c757f0..6c26daa 100644 --- a/src/modules/archive.js +++ b/src/modules/archive.js @@ -123,7 +123,7 @@ module.exports.export = (Ticket, channel) => new Promise((resolve, reject) => { // eslint-disable-next-line no-cond-assign while (line = lineByLine.next()) { - let message = JSON.parse(line.toString('ascii')); + let message = JSON.parse(line.toString('utf8')); let index = data.messages.findIndex(m => m.id === message.id); if (index === -1) data.messages.push(message); else data.messages[index] = message;