mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 17:00:24 +01:00
refactor: store local follow backreferences for remote users (both followers and following), update actor pruning to take local follow counts into consideration, fixes #12701
This commit is contained in:
@@ -181,7 +181,7 @@ async function assertRelation(post) {
|
||||
*/
|
||||
|
||||
// Is followed by at least one local user
|
||||
const numFollowers = await activitypub.actors.getLocalFollowersCount(post.uid);
|
||||
const { followers } = await activitypub.actors.getLocalFollowCounts(post.uid);
|
||||
|
||||
// Local user is mentioned
|
||||
const { tag } = post._activitypub;
|
||||
@@ -201,7 +201,7 @@ async function assertRelation(post) {
|
||||
uids = uids.filter(Boolean);
|
||||
}
|
||||
|
||||
return numFollowers > 0 || uids.length;
|
||||
return followers > 0 || uids.length;
|
||||
}
|
||||
|
||||
Notes.updateLocalRecipients = async (id, { to, cc }) => {
|
||||
|
||||
Reference in New Issue
Block a user