From 1b74679483e259d824d3d7d9dcc9163538987300 Mon Sep 17 00:00:00 2001 From: ale Date: Sun, 13 Oct 2024 21:48:03 +0200 Subject: [PATCH] out Infinity --- lib/api.js | 2 +- server.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/api.js b/lib/api.js index 5c808a2..71a390a 100644 --- a/lib/api.js +++ b/lib/api.js @@ -47,7 +47,7 @@ module.exports = (app, apex) => { actor._local = {} actor._local.blockList = [] const inbox = await apex.getInbox(actor, 'true'), - notes = inbox.orderedItems.filter(e => e.object && e.object.length > 0 && e.object[0].type === 'Note').map(e => e.object[0].content[0]) + notes = inbox.orderedItems.filter(e => e.object && e.object.length > 0 && e.object[0].type === 'Note').slice(0, 20).map(e => e.object[0].content[0]) res.json(notes) }) } diff --git a/server.js b/server.js index bf94d21..985cb2f 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,4 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 -require('events').EventEmitter.defaultMaxListeners = Infinity const apexinstance = require('./lib/apex'), apexcustom = require('./lib/apexcustom'), apiswagger = require('./lib/apiswagger'),