From 70dac3aedebfffd474df63e4125ab1d3eaca9ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 24 Mar 2025 16:02:28 -0400 Subject: [PATCH] dont make db call if ap disabled --- src/user/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/index.js b/src/user/index.js index 0347ccaad3..5e4c08e39f 100644 --- a/src/user/index.js +++ b/src/user/index.js @@ -48,7 +48,7 @@ User.exists = async function (uids) { const [localExists, remoteExists] = await Promise.all([ db.isSortedSetMembers('users:joindate', uids), - db.exists(uids.map(uid => `userRemote:${uid}`)), + meta.config.activitypubEnabled ? db.exists(uids.map(uid => `userRemote:${uid}`)) : uids.map(() => false), ]); const results = localExists.map((local, idx) => local || remoteExists[idx]); return singular ? results.pop() : results;