Blacklisted key handling doesn't mark activity as spam
|Reported by:||DJPaul||Owned by:|
|Component:||Component - Activity||Keywords:|
In 1.6, we've introduced bp_activity_check_blacklist_keys() and bp_activity_check_moderation_keys().
The latter checks WP's 'moderation_keys' option; if there's a match, we prevent the activity from being saved, as Activity doesn't have a pending status. (compared to Comments)
bp_activity_check_blacklist_keys() uses the 'blacklist_keys' option. If there's a match, we should be marking the activity as spam. Currently we prevent the activity from being saved. From the Settings > Discussion admin screen: "When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam".
This change ought to be as straightforward as changing bp_activity_check_blacklist_keys() to set ->is_spam rather than ->component. We will need to check this doesn't cause any php warnings or other errors in logic when the activity is subsequently viewed and/or edited from the Activity admin screen.