From 3e494dc757b759ded1eafa4d8793d5fb1041f807 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Jul 2024 14:30:57 -0400 Subject: [PATCH] fix: updating of post counts for remote users --- src/user/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/posts.js b/src/user/posts.js index 418b897992..2d027cd226 100644 --- a/src/user/posts.js +++ b/src/user/posts.js @@ -111,7 +111,7 @@ module.exports = function (User) { if (uids.length) { const counts = await db.sortedSetsCard(uids.map(uid => `uid:${uid}:posts`)); await Promise.all([ - db.setObjectBulk(uids.map((uid, index) => ([`user:${uid}`, { postcount: counts[index] }]))), + db.setObjectBulk(uids.map((uid, index) => ([`user${activitypub.helpers.isUri(uid) ? 'Remote' : ''}:${uid}`, { postcount: counts[index] }]))), db.sortedSetAdd('users:postcount', counts, uids), ]); }