Skip to main content
These extensions are considered legacy and are scheduled for deprecation. They are no longer recommended for new integrations and will not receive feature updates or enhancements.For new projects, use AI Moderation.

Slow Mode

Slow down messages in groups to make them legible during high-traffic events. When enabled in a group, participants can only send messages after configured intervals. Admins and moderators are not restricted. Enable Slow Mode
CometChat.callExtension('slow-mode', 'POST', 'v1/configure', {
  "guid": "cometchat-guid-1",
  "slowDownTimeInMS": 660000
}).then(response => {
  // Success
}).catch(error => {
  // Error
});
Disable Slow Mode
CometChat.callExtension('slow-mode', 'DELETE', 'v1/configure', {
  "guid": "cometchat-guid-1"
}).then(response => {
  // Success
}).catch(error => {
  // Error
});
Fetch Slow Mode Details
const guid = "cometchat-guid-1";
CometChat.callExtension('slow-mode', 'GET', `v1/fetch-configuration?guid=${guid}`, null)
  .then(response => {
    // { isSlowed, slowDownTimeInMS, lastMessageSentAtTimestamp }
  });

Report User

Enables users to report other users for offensive or suspicious behavior. Settings
  1. Go to Extensions → Enable Report User
  2. Configure moderation criteria (max reports before notification)
  3. Set up webhook URL for reports
Report a User
CometChat.callExtension('report-user', 'POST', 'v1/report', {
  "uid": "cometchat-uid-3",
  "reason": "Misbehaving",
  "guid": "cometchat-guid-1" // Optional: only for group reports
}).then(response => {
  // { success: true }
});
View Reports Open the Extension’s settings page and click “View Reports” to take action (Kick, Ban, Block, or Ignore).

Report Message

Enable users to report messages in conversations. Report a Message
CometChat.callExtension('report-message', 'POST', 'v1/report', {
  "msgId": 123,
  "reason": "Contains profanity"
}).then(response => {
  // { success: true }
});
View Reports Open the Extension’s settings page and click “View Reports” to Delete or Ignore reported messages.

Data Masking Filter

Hide phone numbers, email addresses, and other sensitive information in messages. Settings
  1. Enable the extension
  2. Configure default masks (Emails, SSN, US phone numbers)
  3. Add custom regex patterns for additional masking
Response Format
{
  "@injected": {
    "extensions": {
      "data-masking": {
        "data": {
          "sensitive_data": "yes",
          "message_masked": "My number is ***** & my email id is ****"
        }
      }
    }
  }
}
Implementation
var metadata = message.getMetadata();
if (metadata != null) {
  var injectedObject = metadata["@injected"];
  if (injectedObject?.extensions?.["data-masking"]) {
    var dataMaskingObject = injectedObject.extensions["data-masking"]["data"];
    var message_masked = dataMaskingObject["message_masked"];
  }
}

Profanity Filter

Mask or hide profanity in messages using a customizable blacklist. Settings
  1. Enable the extension
  2. Optionally enable “Drop messages with Profanity”
  3. Add comma-separated list of words to filter (supports emojis)
Response Format
{
  "@injected": {
    "extensions": {
      "profanity-filter": {
        "profanity": "yes",
        "message_clean": "This is ****"
      }
    }
  }
}
Implementation
var metadata = message.getMetadata();
if (metadata != null) {
  var injectedObject = metadata["@injected"];
  if (injectedObject?.extensions?.["profanity-filter"]) {
    var profanityFilterObject = injectedObject.extensions["profanity-filter"];
    var cleanMessage = profanityFilterObject["message_clean"];
  }
}

Image Moderation

AI-powered image moderation to detect unsafe content. Images are classified into:
  • Explicit Nudity
  • Suggestive Nudity
  • Violence
  • Visually Disturbing
Response Format
{
  "@injected": {
    "extensions": {
      "image-moderation": {
        "unsafe": "yes",
        "confidence": "99",
        "category": "explicit_nudity"
      }
    }
  }
}
A confidence value less than 50 is likely a false-positive. Implementation
const metadata = message.getMetadata();
if (metadata != null) {
  const injectedObject = metadata["@injected"];
  if (injectedObject?.extensions?.["image-moderation"]) {
    const { attachments } = injectedObject.extensions["image-moderation"];
    for (const attachment of attachments) {
      if (!attachment.error) {
        const { unsafe } = attachment.data.verdict;
      }
    }
  }
}

Sentiment Analysis

Understand the tone or sentiment of messages. Messages are classified as: Positive, Neutral, Negative, or Mixed. Supported languages: German, English, Spanish, Italian, Portuguese, French, Japanese, Korean, Hindi, Arabic, Chinese (simplified & traditional) Response Format
{
  "@injected": {
    "extensions": {
      "sentiment-analysis": {
        "sentiment": "positive",
        "sentiment_score": {
          "positive": 95,
          "neutral": 4,
          "negative": 0,
          "mixed": 0
        }
      }
    }
  }
}

In-Flight Message Moderation

Manually moderate messages before delivery. Settings Configure moderation criteria:
  • Moderate all messages, one-on-one only, or group only
  • Moderate messages from specific users (UIDs)
  • Moderate messages to specific users or groups
Actions From the Dashboard, you can:
  • Approve: Send the message to the receiver
  • Reject: Delete the message
  • Kick: Remove user from group (can rejoin)
  • Ban: Ban user from group (cannot rejoin)

Virus & Malware Scanner

Scan uploaded files for malicious content using Scanii. Prerequisites Create a Scanii account and get your API Key and Secret. Response Format
{
  "@injected": {
    "extensions": {
      "virus-malware-scanner": {
        "attachments": [{
          "data": {
            "url": "https://media.com/file.mp3",
            "verdict": {
              "scan_results": []
            }
          },
          "error": null
        }]
      }
    }
  }
}
An empty scan_results array means the file is safe.

XSS Filter

Sanitize messages to prevent cross-site scripting attacks. Applicable only for Web SDK. Response Format
{
  "@injected": {
    "extensions": {
      "xss-filter": {
        "hasXSS": "yes",
        "sanitized_message": "<sanitized content>"
      }
    }
  }
}
Implementation
var metadata = message.getMetadata();
if (metadata != null) {
  var injectedObject = metadata["@injected"];
  if (injectedObject?.extensions?.["xss-filter"]) {
    var xssFilterObject = injectedObject.extensions["xss-filter"];
    var sanitized_message = xssFilterObject["sanitized_message"];
  }
}