BuddyPress: Custom activity stream string for comments on custom post type (Quick Tip)

You have to add a filter to enable comments on the custom post type to be recorded by activity stream.

function bbg_record_my_custom_post_type_comments( $post_types ) {
	$post_types[] = 'booz'; // custom post type
	return $post_types;
add_filter( 'bp_blogs_record_comment_post_types', 'bbg_record_my_custom_post_type_comments' );

Now if someone comments on the post of post type booz, the activity stream will record it and it will record some thing like this “sunny commented on the post, post title” but it should be some thing like this “sunny commented on the booz, post title“. To make activity stream record a custom activity use the following code..

Read More