regeneration and database feed generation updates for group posts in feeds

This commit is contained in:
2458773093
2019-08-20 02:54:26 +03:00
parent 1f0f96415e
commit 3214ad5d50
4 changed files with 26 additions and 1 deletions

View File

@@ -283,7 +283,13 @@ class Status < ApplicationRecord
end
def as_home_timeline(account)
where(account: [account] + account.following).or(where(group: account.groups)).where(visibility: [:public, :unlisted, :private])
query = where(account: [account] + account.following)
if account.user.allows_group_in_home_feed?
query = query.or(where(group: account.groups))
end
query.where(visibility: [:public, :unlisted, :private])
end
def as_group_timeline(group)