nandi/gleanpublic⑂ Fork 0
⑂ 8df4ed4
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Only include active users in people recommendationsUnverified

Julien Robert committed 2026-04-22T13:57:38+02:00 Browse files
8df4ed4 parent: 57ab456
modified internal/cluster/scoring.go +1 -0
@@ -255,6 +255,7 @@ func (e *Engine) ComputePeopleRecommendationsOnDemand(ctx context.Context, userD
255255 ) sim
256256 JOIN users u ON u.did = sim.peer_did
257257 WHERE u.handle IS NOT NULL AND u.handle != ''
258+ AND EXISTS (SELECT 1 FROM subscriptions s JOIN feeds f ON s.feed_url = f.feed_url WHERE s.user_did = u.did AND f.subscriber_count > 0)
258259 ORDER BY sim.jaccard DESC
259260 LIMIT ?
260261 `, userDID, userDID, limit)
@@ -255,6 +255,7 @@ func (e *Engine) ComputePeopleRecommendationsOnDemand(ctx context.Context, userD
255 ) sim255 ) sim
256 JOIN users u ON u.did = sim.peer_did256 JOIN users u ON u.did = sim.peer_did
257 WHERE u.handle IS NOT NULL AND u.handle != ''257 WHERE u.handle IS NOT NULL AND u.handle != ''
258+ AND EXISTS (SELECT 1 FROM subscriptions s JOIN feeds f ON s.feed_url = f.feed_url WHERE s.user_did = u.did AND f.subscriber_count > 0)
258 ORDER BY sim.jaccard DESC259 ORDER BY sim.jaccard DESC
259 LIMIT ?260 LIMIT ?
260 `, userDID, userDID, limit)261 `, userDID, userDID, limit)