FIX: Improve top links section from user summary (#15675)

* Do not extract links for hotlinked images
* Include only links that have been clicked at least once in user
summary
This commit is contained in:
Bianca Nenciu
2022-01-24 02:33:23 +02:00
committed by GitHub
parent cd68279f5c
commit 48e5d1af03
4 changed files with 25 additions and 0 deletions

View File

@ -40,6 +40,7 @@ class UserSummary
.merge(Topic.listable_topics.visible.secured(@guardian))
.where(user: @user)
.where(internal: false, reflection: false, quote: false)
.where('clicks > 0')
.order('clicks DESC, topic_links.created_at DESC')
.limit(MAX_SUMMARY_RESULTS)
end