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", "name": "@eartharoid/discordtickets",
"version": "2.1.1", "version": "2.1.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1527,11 +1527,6 @@
"type-check": "~0.4.0" "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": { "lodash": {
"version": "4.17.19", "version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "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 // eslint-disable-next-line no-cond-assign
while (line = lineByLine.next()) { 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); let index = data.messages.findIndex(m => m.id === message.id);
if (index === -1) data.messages.push(message); if (index === -1) data.messages.push(message);
else data.messages[index] = message; else data.messages[index] = message;