friends_check_friendship_status()
will handle the ‘friend check’ for you. bp_activity_at_name_filter
is the @-mention filter you speak of. It’s hooked to various stuff such as bp_activity_comment_content
and pre_comment_content
. Hope this helps. If you need anything else just shout.
@henrywright
Is there a way for a user to “unmention” themselves from an update/post or to delete any post in its entirety which exclusively mentions them, something like untag/remove tag facility in facebook ? I am talking about more control for a user to manage their mentions so far in the community. I think it would be very useful to have such an option as a community user.
Case example: A buddypress community with Friend connections disabled. Any user could mention another out of the blue. A user “foo” mentioned user “bar” in a post, now “bar” wants out of that post so “bar” could either delete that post or could unmention (@ link turns into plain text or disappears.)himself/herself out of this post from his/her Mentions tab or using an unmention button which he/she could see beneath every activity entry he/she is mentioned in.
My guess to doing this would be something like the following:
1.) Set up somewhere where they can see all their mentions and put a button on each item that allows them to unmention themselves
2.) This button would set a value somewhere in the db that specifically points to the id of where they are mentioned
3.) The filter that sets the link would check this value before adding the link
hope that helps a bit.
@mercime is this about right?
P.S. Mentioning someone in a thread about mentions; how meta am I 🙂