Skip deactivated users in followers import

This commit is contained in:
Egor Kislitsyn 2019-10-14 14:16:57 +07:00
parent 1d46944fbd
commit 8ad015ef64
No known key found for this signature in database
GPG Key ID: 1B49CB15B71E7805
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ defp import_following_from_activities do
WHERE
activities.data ->> 'type' = 'Follow'
AND activities.data ->> 'state' IN ('accept', 'pending', 'reject')
AND NOT (followers.info ? 'deactivated' AND followers.info -> 'deactivated' @> 'true')
ORDER BY activities.updated_at DESC
ON CONFLICT DO NOTHING
"""