0
0
Fork 0

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:
Eugen Rochko 2019-02-04 04:25:59 +01:00 committed by GitHub
parent d14c276e58
commit 364f2ff9aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 238 additions and 8 deletions

View file

@ -7,6 +7,7 @@ class CreateAccountModerationNotes < ActiveRecord::Migration[5.1]
t.timestamps
end
add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id
end
end

View file

@ -0,0 +1,12 @@
class CreateFeaturedTags < ActiveRecord::Migration[5.2]
def change
create_table :featured_tags do |t|
t.references :account, foreign_key: { on_delete: :cascade }
t.references :tag, foreign_key: { on_delete: :cascade }
t.bigint :statuses_count, default: 0, null: false
t.datetime :last_status_at
t.timestamps
end
end
end