#4284 closed enhancement (fixed)
Blacklisted key handling doesn't mark activity as spam
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | 1.6 |
Component: | Activity | Keywords: | |
Cc: |
Description
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.
(In [6127]) When a part of an activity item matches WordPress' word blacklist, allow the activity
to be recorded to the database, but mark it as spam. Fixes #4284.