Fixed archive issues with emoji

This commit is contained in:
Isaac (eartharoid) 2020-11-15 22:52:43 +00:00
parent 5c61bffd09
commit aab1b4a81a
2 changed files with 2 additions and 7 deletions

7
package-lock.json generated
View File

@ -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",

View File

@ -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;