Skip to:

Opened 3 months ago

Last modified 3 months ago

#3393 new enhancement

User subscribtions

Reported by: peterkueger Owned by:
Milestone: Awaiting Review Priority: low
Severity: normal Version:
Component: API - User Relationships Keywords:


Would be nice to subscribe users.

Until now, each user can subscribe to forums and topics, but not to other users. Maybe he likes the postings of a special user and wants to read all his posts.

Other very public social media sites are implementing this feature by "Followers".

The "bbp_is_user_subscribed" function has a parameter "type", but it will not be stored into the database. So currently, only "post" as "type" works. Maybe "user" could be a "type" too?

This could be implemented by changing the code of bbpress/includes/common/engagements.php, line 578


$key = ( bbp_get_forum_post_type() === $post_type )
  ? '_bbp_forum_subscriptions'
  : '_bbp_subscriptions';


$key = ( bbp_get_forum_post_type() === $post_type )
  ? '_bbp_forum_subscriptions'
  : ( ( 'user' === $post_type )
  ? '_bbp_user_subscriptions'
  : '_bbp_subscriptions' );

Additional, it must be handled in the functions "bbp_notify_topic_subscribers" and "bbp_notify_topic_subscribers" (bbpress/includes/common/functions.php, line 1063)


$user_ids = bbp_get_subscribers( $topic_id );


if ( ! $reply_author )
  $reply_author = bbp_get_reply_author( $reply_id )
$user_ids = array_unique( array_merge( bbp_get_subscribers( $topic_id ), bbp_get_subscribers( $reply_author, 'user' ) ) );

Btw: The subscriptions are stored "global", not like other settings (f.e. '_bbp_topic_count', '_bbp_reply_count', 'bbp_last_activity' and '_bbp_last_posted')

I searched about this request in the tracker, but I didn't found it. I hope, I searched good enough...

Change History (1)

#1 @johnjamesjacoby
3 months ago

The type parameter was introduced specifically to allow something like this in the future.

The exact code to make this work completely will be more complicated, but you are correct that these functions would be its entry point.

Note: See TracTickets for help on using tickets.