Thanks for this, it worked! Just tested clicking the “Go to the discussion” link in the email when not logged in and it successfully redirected me to the login page instead of 404 page.
If you are logged in an you click on this link, it works fine and takes you straight to the conversation, but if you are not logged in an click it, it just takes you to the 404 page instead.
I’m facing the same issue. It was working fine with earlier versions of BuddyPress, but now when you click “Go to the discussion” link in the email, it redirects to the 404 page.
BuddyPress Version 3.1.0 (latest version)
Can this be resolved within BuddyPress by adding a hook in functions.php or buddypress-functions.php file? Don’t really want to install a redirect plugin, as we still need a 404 page to show.