Repository navigation
Akismet-based spam moderation for blog comments - #845
Merged
Merged
Conversation
Integrates Akismet spam filtering via AkismetSpamBlockingService and updates CommentManager to check/report spam using ISpamBlockingService. Adds Akismet API key support to config and admin UI. Refactors Subtext.Akismet for .NET 10, removes legacy HttpClient, and updates solution/projects for new dependencies and compatibility. Updates tests and view models for new spam moderation features.
Implements backend, API, and UI for marking comments as spam. Updates CommentManager, interfaces, and BlogDataService to support spam flagging and reporting. Adds PATCH endpoint and tag helper for admin UI. Improves Akismet integration and spam service checks. Updates config and UI to enable and display the new action.
Expanded CommentManager tests for spam scenarios, including spam detection, admin bypass, service enable/disable, and spam reporting. Added AkismetSpamBlockingService tests to verify enablement logic and ensure no network calls or side effects when disabled.
Refactored ISpamBlockingService and AkismetSpamBlockingService to use Task-based async methods for spam checking and reporting. Updated CommentManager and all controller/test call sites to use AddCommentAsync and async/await. AkismetClient now provides async network operations with cancellation support. Fire-and-forget spam/ham reporting now logs exceptions as warnings. All related unit tests updated for async APIs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Classification
New feature: Adds Akismet-based spam moderation for blog comments.
PR Summary
This PR integrates Akismet spam detection into DasBlog Core, enabling automated and admin-driven spam handling for comments. It also modernizes the Akismet client and updates the admin UI for spam management.