disable group posts in home feed

This commit is contained in:
Rob Colbert 2019-08-28 02:21:42 -04:00
parent 0cc5dfab07
commit 1196ef362d

View File

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