Skip to content
Extraits de code Groupes Projets
Valider 5bd47f20 rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

Only get non-pending posts in posts_from

parent b3cb8e0a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter