Skip to content

Commit ef57d29

Browse files
authored
Allow fan-club notifications with low user score (#754)
1 parent 0c593a9 commit ef57d29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/v1_notifications.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ WHERE
172172
)
173173
)
174174
AND (
175-
-- Check entity_user_id if present
175+
-- Check entity_user_id if present (skip score check for fan club notifications since the entity user must be verified)
176176
NOT (n.data ? 'entity_user_id') OR EXISTS (
177177
SELECT 1 FROM users u2
178178
JOIN aggregate_user a2 ON u2.user_id = a2.user_id
179179
WHERE u2.user_id = (n.data->>'entity_user_id')::integer
180180
AND u2.is_current = true
181181
AND u2.is_deactivated = false
182-
AND a2.score >= 0
182+
AND (n.type = 'fan_club_text_post' OR a2.score >= 0)
183183
)
184184
)
185185
)

0 commit comments

Comments
 (0)