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

Fix find_visible_post_by_id

parent 2487db32
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -7,7 +7,8 @@ module Diaspora ...@@ -7,7 +7,8 @@ module Diaspora
module Querying module Querying
def find_visible_post_by_id( id ) def find_visible_post_by_id( id )
self.raw_visible_posts.where(:id => id).includes({:author => :profile}, {:comments => {:author => :profile}}, :photos).first post = Post.where(:id => id).joins(:contacts).where(:contacts => {:user_id => self.id}).first
post ||= Post.where(:id => id, :author_id => self.person.id).first
end end
def raw_visible_posts(opts = {}) def raw_visible_posts(opts = {})
......
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