Merge branch 'develop' of https://code.gab.com/gab/social/gab-social into develop
This commit is contained in:
commit
7c897d69a2
|
@ -342,12 +342,12 @@ class Status < ApplicationRecord
|
|||
end
|
||||
|
||||
def as_pro_timeline(account = nil)
|
||||
query = timeline_scope.without_replies.popular_accounts.where('statuses.created_at > ?', 2.hours.ago)
|
||||
query = timeline_scope.without_replies.popular_accounts.where('statuses.updated_at > ?', 2.hours.ago)
|
||||
apply_timeline_filters(query, account)
|
||||
end
|
||||
|
||||
def as_public_timeline(account = nil)
|
||||
query = timeline_scope.without_replies.where('statuses.created_at > ?', 15.minutes.ago)
|
||||
query = timeline_scope.without_replies.where('statuses.updated_at > ?', 15.minutes.ago)
|
||||
apply_timeline_filters(query, account)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
class AddProUsersFeedMaterializedView < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
safety_assured {
|
||||
execute <<-SQL
|
||||
CREATE MATERIALIZED VIEW pro_feed_users_matview AS
|
||||
SELECT id
|
||||
FROM accounts
|
||||
WHERE accounts.is_investor=true
|
||||
OR accounts.is_donor=true
|
||||
OR accounts.is_verified=true
|
||||
OR accounts.is_pro=true
|
||||
SQL
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue