Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3-6544 Send comment_type and user_role to spam checker for tickets and comments #5084

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

sarken
Copy link
Collaborator

@sarken sarken commented Feb 27, 2025

Issue

https://otwarchive.atlassian.net/browse/AO3-6544

Purpose

Lets the spam checker know if it's checking

  • content from a guest or (on the Suport and PAC contact forms) someone who is logged in but has entered an email address that isn't the one on their account
  • content from a contact form, blog (admin post) comment, or fanwork comment (as opposed to a fanwork)

Testing Instructions

Refer to Jira

References

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to set comment_type on comments, or is comment assumed by Akismet to be the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not something they suggested we do, but we can! However, I think it might be worth getting a little fancier. The docs say:

Akismet works with almost any kind of user‑submitted web content: blog comments, forum posts, blog posts, contact forms and so on. The characteristics of spam tend to vary across those type – comment spam is quite different from forum spam. So it’s important to give us some context by telling us what type of messages you’re asking Akismet to check.
[...]
It’s especially important not to default to comment for messages that are fundamentally different from blog comments – if you do that, you can expect to see mixed results. It’s better to be too specific than too ambiguous.

So I think the best option for us would be to use:

  • comment for comments on admin posts, which are basically blog posts
  • fanwork-comment for comments on works

@redsummernight redsummernight merged commit be7d221 into otwcode:master Mar 11, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants