Skip to content

Add support for reporting spam/ham to Akismet #2

@jensbrak

Description

@jensbrak

Currently, SpamDetector module only submit posted comments for review by Akismet. To be a full implementation of an Akismet plugin, the module has to support reporting spam and ham (report spam: re-submit spam comment that was missed, report ham: re-submit a false positive i.e. valid comment mistaken for spam). See https://akismet.com/developers/detailed-docs/submit-ham-false-positives/

The most obvious way to identify ham and missed spam is by user interaction in the comment admin interface of Piranha. Problem is, the admin interface for comments is limited to approve/reject comments as well as deleting them. But not more than this. In general, the Piranha Manager functionality for comments is rather limited and that is by design. Extending the interface for it would likely mean to extend both Piranha as well as Piranha Manager with regard to comments. This is, as I see it, beyond the scope of what the SpamDetector module is intended to be.

Another option would be to implement the spam/ham reporting functionality using existing functionality. Relevant limitations are:

  • Comments are either approved or they're not. Reason why or by who/what is not considered/supported.
  • Manager module for comments only support deleting comments or toggle between approved/rejected.

The most straight forward way to implement spam/ham using these limitations (?) would be:

  • A comment that is marked as approved, but is manually deleted in the Manager, is to be considered missed spam. Therefore, intercept the deletion and report missed spam.
  • A comment that is marked as rejected, but is manually toggled as approved in the Manager, is to be considered ham. Therefore, intercept the approved/rejected toggle and report ham.

I haven't investigated if it's easy or even feasible to intercept deletion/approval of comments in Manager.
There's no way of determine if a comment is rejected by the SpamModule or manual interaction in the Manager.
Ham/spam reporting would be done regardless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions