Commit 325d40955cbaf4ce5d965e9348221ba9f34071ce
Committed by
Macartur Sousa
1 parent
de001979
Exists in
fix_profile_wall
Fix more comments action from network tab
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
app/controllers/public/profile_controller.rb
... | ... | @@ -218,7 +218,10 @@ class ProfileController < PublicController |
218 | 218 | |
219 | 219 | def more_comments |
220 | 220 | profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile} |
221 | - activity = ActionTracker::Record.where({:id => params[:activity]}.merge profile_filter).first | |
221 | + activity = ActionTracker::Record.where(:id => params[:activity]) | |
222 | + activity = activity.where(profile_filter) if !logged_in? || !current_person.follows?(@profile) | |
223 | + activity = activity.first | |
224 | + | |
222 | 225 | comments_count = activity.comments.count |
223 | 226 | comment_page = (params[:comment_page] || 1).to_i |
224 | 227 | comments_per_page = 5 | ... | ... |