diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 0601f468d60..cf887edd2c2 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -263,8 +263,12 @@ SQL def self.apply_common_filters(builder,user_id,guardian,ignore_private_messages=false) + # We never return deleted topics in activity + builder.where("t.deleted_at is null") + + # We will return deleted posts though if the user can see it unless guardian.can_see_deleted_posts? - builder.where("p.deleted_at is null and p2.deleted_at is null and t.deleted_at is null") + builder.where("p.deleted_at is null and p2.deleted_at is null") current_user_id = -2 current_user_id = guardian.user.id if guardian.user