Skip to main content
AI Moderation automatically reviews messages for inappropriate content, reducing manual intervention. Messages are sent with a PENDING status and updated to APPROVED or DISAPPROVED after processing.
For a broader understanding of moderation features, configuring rules, and managing flagged messages, see the Moderation Overview.

Prerequisites

Before using AI Moderation, ensure the following:
  1. Moderation is enabled for your app in the CometChat Dashboard
  2. Moderation rules are configured under Moderation > Rules
  3. You’re using CometChat SDK version that supports moderation

How It Works

Supported Message Types

Moderation is triggered only for the following message types:

Moderation Status

The getModerationStatus() method returns one of the following values:

Implementation

Step 1: Send a Message and Check Initial Status

When you send a text, image, or video message, check the initial moderation status:

Step 2: Listen for Moderation Results

Register a message listener to receive moderation results in real-time. The onMessageModerated callback provides a BaseMessage with the final moderation status:

Step 3: Handle Disapproved Messages

When a message is disapproved, handle it appropriately in your UI:

Next Steps

Moderation Overview

Configure moderation rules and manage flagged messages

Flag Message

Allow users to report inappropriate messages

Send Message

Send text, image, and video messages with automatic moderation

Dashboard

Enable and configure AI moderation in the CometChat Dashboard