From 36f263a07df455f75eecbccfd37a7aa7b2121e78 Mon Sep 17 00:00:00 2001 From: "Isaac (eartharoid)" Date: Fri, 13 Nov 2020 19:57:06 +0000 Subject: [PATCH] Update archive.js --- src/modules/archive.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/modules/archive.js b/src/modules/archive.js index 6ab0131..4c757f0 100644 --- a/src/modules/archive.js +++ b/src/modules/archive.js @@ -117,23 +117,18 @@ module.exports.export = (Ticket, channel) => new Promise((resolve, reject) => { }; data.messages = []; - let line, - lineNumber = 0; + let line; const lineByLine = new Readlines(join(__dirname, raw)); // eslint-disable-next-line no-cond-assign while (line = lineByLine.next()) { - let message = JSON.parse(line.toString('ascii')); let index = data.messages.findIndex(m => m.id === message.id); if (index === -1) data.messages.push(message); else data.messages[index] = message; - lineNumber++; } - data.ticket.messages = lineNumber; - let endpoint = config.transcripts.web.server; if (endpoint[endpoint.length - 1] === '/') endpoint = endpoint.slice(0, -1);