Nested reply notifications bug
-
I think I may have spotted a bug in the notifications that are raised for a nested reply.
In
bbpress/includes/extend/buddypress/notifications.php
LINE 165// Notify the immediate reply author if not the current reply author if ( ! empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) { $args['user_id'] = $reply_to_item_id; $args['secondary_item_id'] = $topic_author_id; bp_notifications_add_notification( $args ); }
I believe the secondary_item_id here should be $author_id.
Otherwise:
user1 writes the topic
user2 replies to the topic
user3 replies to user2This will add a notification for user2 with user1 as the author, where as it should have a notification for user2 with user3 as the author.
The fix is to change this line to
$args['secondary_item_id'] = $author_id;
Would love to know if I’ve misunderstood the logic here, or if this is a genuine bug.
Thanks
Pete
- You must be logged in to reply to this topic.