Skip to content

Commit

Permalink
fix: JSON int limit for message IDs exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorifor committed Dec 22, 2024
1 parent 04c753c commit 1d5ca48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

import { _new, _get, _getAll, lockBodyScroll, debounce, removeAccents } from './utils.js';
import { JSONParse } from './json-with-bigint.min.js';

const fileInput = _get('#package-file');
const channelsContainer = _get('.channels');
Expand Down Expand Up @@ -453,9 +454,8 @@ function downloadExport() {
* @returns { int[] }
*/
async function getChannelMessagesIds(channel) {
// console.log(`messages/${channel}/messages.json`);
const channelMessagesFile = archiveRoot.find(file => file.filename === `messages/${channel}/messages.json`);
let messagesList = JSON.parse(await channelMessagesFile.getData(new zip.TextWriter()));
let messagesList = JSONParse(await channelMessagesFile.getData(new zip.TextWriter()));
return messagesList.map(message => message['ID'].toString());
}

Expand Down
1 change: 1 addition & 0 deletions json-with-bigint.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d5ca48

Please sign in to comment.