Skip to main content

Overview

Rules Management allows you to define and manage moderation rules that automatically detect and handle inappropriate content. Configure rules once in the Dashboard, and they’re automatically applied to all messages sent through CometChat.
Using UI Kit or SDK? Once you configure rules in the Dashboard, they are automatically applied to all messages. No additional code is required - the UI Kit and SDK handle moderation seamlessly.

Quick Start

Enable moderation in under 2 minutes:
1

Open Rules Settings

Login to CometChat Dashboard → Select your app → ModerationSettingsRules
2

Enable Default Rules

Toggle on the rules you need (e.g., Profanity Filter, AI Image Moderation)
3

Test It

Send a test message that violates the rule - it should be blocked automatically

Available Rules Summary

RuleDescriptionUse Case
Profanity FilterBlocks offensive language using keyword matchingGeneral chat apps
Contact Details FilterBlocks phone numbersMarketplaces, dating apps
Email FilterBlocks email addressesPrevent off-platform contact
AI Toxicity DetectionAI-powered detection of toxic languageCommunity platforms
AI Spam DetectionDetects spam messagesHigh-traffic apps
AI Scam DetectionIdentifies fraudulent messagesMarketplaces, finance apps
AI Platform CircumventionDetects attempts to bypass rulesAll apps

Essential:
  • Profanity Filter
  • AI Toxicity Detection
  • AI Image Moderation
  • OpenAI Hate & Harassment
Recommended:
  • AI Spam Detection
  • OpenAI Explicit Content
Essential:
  • Contact Details Filter
  • Email Filter
  • AI Scam Detection
  • AI Platform Circumvention
Recommended:
  • Profanity Filter
  • AI Image Moderation
Essential:
  • Contact Details Filter
  • Email Filter
  • AI Image Moderation
  • OpenAI Explicit Content
Recommended:
  • AI Scam Detection
  • OpenAI Privacy Data (Image)
Essential:
  • Profanity Filter
  • AI Toxicity Detection
  • AI Spam Detection
Recommended:
  • OpenAI Hate & Harassment
  • AI Image Moderation
Essential:
  • OpenAI Privacy & Sensitive Info
  • OpenAI Privacy Data (Image)
  • AI Scam Detection
Recommended:
  • Profanity Filter
  • Contact Details Filter

Best Practices

Start with Defaults

Enable default rules first, then customize based on your needs. Don’t try to configure everything at once.

Test Before Launch

Test rules in a staging environment. Send test messages to verify rules work as expected.

Monitor Regularly

Check the Blocked Messages dashboard regularly to catch false positives.

Iterate & Refine

Review Rule Revisions to track changes and refine rules over time.

Tips for Effective Moderation

  1. Layer your rules - Use multiple rules together (e.g., Profanity Filter + AI Toxicity) for better coverage
  2. Adjust confidence levels - Lower confidence = more aggressive blocking, higher = fewer false positives
  3. Use Flag action for borderline content - Instead of blocking, flag messages for manual review
  4. Create custom keyword lists - Add industry-specific terms to the Lists Management

Default Rules

Default rules are pre-configured and ready to use. Simply toggle them on in the Dashboard.
Automatically detects and blocks messages containing offensive language, profanity, or derogatory remarks using a predefined list of offensive keywords.Example: Before enabling, profane messages are delivered (double ticks). After enabling, they’re blocked (single tick).
Detects and blocks messages containing phone numbers to prevent sharing of private contact information.
Detects and blocks messages containing email addresses to prevent off-platform communication.
AI-powered detection of toxic, harmful, or inappropriate language including threats, harassment, and hate speech. Supports multiple languages.
Detects attempts by users to bypass platform rules using sentence similarity analysis.
Identifies scam-related messages including phishing attempts, fake offers, and fraudulent schemes.
Detects and filters spam messages by analyzing content patterns and identifying unwanted communications.
Detects hateful or harassing language toward individuals or groups using OpenAI moderation.
Detects messages sharing personal or sensitive information without consent.
Identifies explicit sexual descriptions, graphic violence, or unsuitable text.
Detects spam messages, phishing attempts, and fraudulent schemes.
Identifies content promoting violence or extremism.
Detects sexual exploitation, grooming, or non-consensual content.
Identifies deceptive attempts to impersonate individuals or organizations.
Detects messages suggesting self-harm or suicidal thoughts.

Rule Configuration

Filters

Filters narrow down which messages are checked by a rule based on sender or receiver attributes:
Filter TypeProperties
SenderUID, Role, Name, Tags, Created date
ReceiverName, GUID, Tags, Group type, Created date, Type (user/group)

Conditions

Conditions define what content triggers the rule:
Content TypeAvailable Conditions
Text/CustomKeyword list, Word patterns, Toxicity, Sentiment, Sentence similarity
Image/VideoViolence, Gambling, Alcohol, Drugs, Nudity, Hate symbols, Unsafe content
You can set a confidence percentage for AI-based conditions to control sensitivity.

Actions

Actions determine what happens when content matches the conditions:
ActionDescription
BlockMessage is not delivered (default)
FlagMessage is delivered but flagged for review
Ban UserUser is banned from the group
Kick UserUser is removed from the group
Block UserUser is blocked platform-wide

Managing Rules

Create Rule

  1. Click Add in the Rules tab
  2. Configure:
    • Name: Descriptive name for the rule
    • Rule ID: Unique identifier
    • Description: Purpose of the rule
    • Filter: Who the rule applies to
    • Condition: What triggers the rule
    • Action: What happens when triggered
  3. Click Save
  4. Enable the rule to start moderating

List Rules

All configured rules are displayed in the Rules tab with their name, status, and actions.

Update Rule

  1. Click Edit in the action menu
  2. Modify the rule settings
  3. Click Save

Delete Rule

Click Delete in the action menu and confirm.

Rule Revisions

Track the history of changes made to a rule:
  1. Click View in the action menu
  2. Navigate to Rule History