Social Paper activity filter should only apply when activity scope includes SP types
Social Paper filters activity queries to ensure that items related to private SPs are not included in activity streams. https://github.com/cuny-academic-commons/social-paper/blob/master/includes/hooks-buddypress-activity.php#L444 This filter adds overhead, since it requires a cacsp_get_protected_papers_for_user() query.
We can reduce this overhead by bailing out of the filter when we know that SP types will not be included in the results. We should be able to figure this out by looking at the 'type' value. See the $r param at https://buddypress.trac.wordpress.org/browser/tags/3.2.0/src/bp-activity/classes/class-bp-activity-activity.php?marks=570#L559
#3 Updated by Boone Gorges 10 months ago
- Status changed from New to Resolved