Skip to content

feat: Add AI-powered spam detection, flagging, and automated moderation for forum discussions - #39036

Open
Alam-2U wants to merge 4 commits into
openedx:masterfrom
Alam-2U:feat/ai-moderation
Open

feat: Add AI-powered spam detection, flagging, and automated moderation for forum discussions#39036
Alam-2U wants to merge 4 commits into
openedx:masterfrom
Alam-2U:feat/ai-moderation

Conversation

@Alam-2U

@Alam-2U Alam-2U commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds is_spam to Thread.accessible_fields and Comment.accessible_fields in the comment client so the AI moderation verdict set by forum-v2 survives the trip into the LMS.

accessible_fields is an allow-list: Model.__init__ runs extract(kwargs, accessible_fields) and _update_from_response only sets keys that appear in it. Without this, is_spam is silently dropped from every forum-v2 response.

Changes

  • comment_client/thread.py — add is_spam to accessible_fields
  • comment_client/comment.py — add is_spam to accessible_fields

No behaviour change on its own; no new settings or migrations.

Dependencies

Requires the forum-v2 AI moderation change, which populates the field.

Safe to merge before or after the forum change — if the key is absent, it is simply not set.

Related PRs

@Alam-2U Alam-2U changed the title feat: AI moderation feature feat: Add AI-powered spam detection, flagging, and automated moderation for forum discussions Aug 31, 2026
@Alam-2U
Alam-2U requested a review from robrap August 31, 2026 11:01
@Alam-2U
Alam-2U removed the request for review from robrap September 1, 2026 12:45
@Alam-2U
Alam-2U requested a review from robrap September 1, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants