repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
7056d3c
parent
7e3add8
author
Eric Bower
date
2024-05-21 18:35:04 +0000 UTC
fix: denylist for discovery feed to remove spam
1 files changed,  +4, -1
M db/postgres/storage.go
+4, -1
 1@@ -186,6 +186,8 @@ const (
 2 	WHERE hidden = FALSE AND publish_at::date <= CURRENT_DATE AND cur_space = $3
 3 	ORDER BY updated_at DESC
 4 	LIMIT $1 OFFSET $2`
 5+	// add some users to deny list since they are robogenerating a bunch of posts
 6+	// per day and are creating a lot of noise
 7 	sqlSelectPostsByRank = `
 8 	SELECT
 9 		posts.id,
10@@ -204,7 +206,8 @@ const (
11 	WHERE
12 		hidden = FALSE AND
13 		publish_at::date <= CURRENT_DATE AND
14-		cur_space = $3
15+		cur_space = $3 AND
16+		app_users.name NOT IN ('algiegray', 'mrrccc')
17 	ORDER BY publish_at DESC
18 	LIMIT $1 OFFSET $2`
19