Add featured hashtags to profiles (#9755)
* Add hashtag filter to profiles GET /@:username/tagged/:hashtag GET /api/v1/accounts/:id/statuses?tagged=:hashtag * Display featured hashtags on public profile * Use separate model for featured tags * Update featured hashtag counters on-write * Limit featured tags to 10
This commit is contained in:
parent
d14c276e58
commit
364f2ff9aa
24 changed files with 238 additions and 8 deletions
|
@ -131,6 +131,10 @@ class RemoveStatusService < BaseService
|
|||
end
|
||||
|
||||
def remove_from_hashtags
|
||||
@account.featured_tags.where(tag_id: @status.tags.pluck(:id)).each do |featured_tag|
|
||||
featured_tag.decrement(@status.id)
|
||||
end
|
||||
|
||||
return unless @status.public_visibility?
|
||||
|
||||
@tags.each do |hashtag|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue