Skip to content

feat: AI moderation feature - #39036

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

feat: AI moderation feature#39036
Alam-2U wants to merge 2 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 marked this pull request as ready for review August 28, 2026 07:28
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.

1 participant