Only get non-pending posts in posts_from
This commit is contained in:
parent
b3cb8e0a2b
commit
5bd47f20c1
1 changed files with 2 additions and 2 deletions
|
|
@ -88,8 +88,8 @@ module Diaspora
|
|||
if contact = self.contact_for(person)
|
||||
post_ids = contact.post_visibilities.select('post_visibilities.post_id').map{|p| p.post_id}
|
||||
end
|
||||
post_ids += person.posts.where(:public => true, :pending => false).select('posts.id').map{|p| p.id}
|
||||
Post.where(:id => post_ids).select('DISTINCT `posts`.*').order("posts.created_at DESC")
|
||||
post_ids += person.posts.where(:public => true).select('posts.id').map{|p| p.id}
|
||||
Post.where(:id => post_ids, :pending => false).select('DISTINCT `posts`.*').order("posts.created_at DESC")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue