Add group own post to group timeline

This commit is contained in:
noellabo 2020-08-30 22:49:09 +09:00
parent acb22de646
commit 2d5a103176

View file

@ -88,11 +88,13 @@ module AccountAssociations
visibility = [:public, :unlisted] visibility = [:public, :unlisted]
visibility.push(:private) if account&.following?(self) visibility.push(:private) if account&.following?(self)
scope = Status.where(id: scope = Status.unscoped
Status.where(account_id: id) .where(id:
Status.reorder(nil)
.where(account_id: id)
.where(visibility: visibility) .where(visibility: visibility)
.select(:reblog_of_id) .select('CASE reblog_of_id WHEN NULL THEN id ELSE reblog_of_id END')
) )
scope = scope.where.not(account_id: account.excluded_from_timeline_account_ids) unless account.nil? scope = scope.where.not(account_id: account.excluded_from_timeline_account_ids) unless account.nil?
scope scope
end end