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'),