Skip to content

Commit

Permalink
Only check for pod_only status on Posts (not Photos).
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistos committed Jan 10, 2012
1 parent c4db9c4 commit 181c945
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/diaspora/user/querying.rb
Expand Up @@ -12,7 +12,9 @@ def find_visible_shareable_by_id(klass, id, opts={} )
key = opts.delete(:key) || :id
post = klass.where(key => id).joins(:contacts).where(:contacts => {:user_id => self.id}).where(opts).select(klass.table_name+".*").first
post ||= klass.where(key => id, :author_id => self.person.id).where(opts).first
post ||= klass.where(key => id, :pod_only => true).where(opts).first
if klass == Post
post ||= klass.where(key => id, :pod_only => true).where(opts).first
end
post ||= klass.where(key => id, :public => true).where(opts).first
end

Expand Down

0 comments on commit 181c945

Please sign in to comment.