From dcbbc187ab656f46af30508d25503d13181bf5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 10 Feb 2026 17:58:04 -0500 Subject: [PATCH] fx: filter at the end of user.search remove commented out code --- src/user/search.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/user/search.js b/src/user/search.js index 7edfeb73ca..fada808e15 100644 --- a/src/user/search.js +++ b/src/user/search.js @@ -77,7 +77,7 @@ module.exports = function (User) { uids.length = data.hardCap; } - const result = await plugins.hooks.fire('filter:users.search', { uids: uids, uid: uid }); + const result = await plugins.hooks.fire('filter:users.search', { uids, uid }); uids = result.uids; const searchResult = { @@ -106,8 +106,9 @@ module.exports = function (User) { } searchResult.timing = (process.elapsedTimeSince(startTime) / 1000).toFixed(2); - searchResult.users = userData.filter(user => (user && - utils.isNumber(user.uid) ? user.uid > 0 : activitypub.helpers.isUri(user.uid))); + searchResult.users = userData.filter( + user => user && (utils.isNumber(user.uid) ? user.uid > 0 : activitypub.helpers.isUri(user.uid)) + ); return searchResult; }; @@ -122,7 +123,6 @@ module.exports = function (User) { hardCap = hardCap || 500; const data = await db.getSortedSetRangeByLex(`${searchBy}:sorted`, min, max, 0, hardCap); - // const uids = data.map(data => data.split(':').pop()); const uids = data.map((data) => { if (data.includes(':https:')) { return data.substring(data.indexOf(':https:') + 1);