Moderation

Chat App Moderation Basics: A Practical Guide for Indie Devs

Chat is fast, mostly private and aimed at one person, which makes it the hardest content to moderate. This guide covers the basics a small team can ship before launch.

Chat is the hardest kind of user content to moderate. It is fast, mostly private and aimed at one person, so nobody else sees a problem until the recipient reports it. A small team cannot read every message, but a few mechanisms remove most of the harm. Here they are, roughly in the order you need them.

Real-time constraints

People expect a sent message to appear in well under a second, which leaves little room for a moderation call. Decide where the check sits.

ApproachHow it worksGood for
Check, then deliverYour server holds the message until the check returnsCategories you never want delivered, and conversations with strangers or new accounts
Deliver, then checkThe message appears at once; a background job retracts it if it is blockedEstablished friends and small trusted groups
HybridCheap local rules first, then the classifier with a deadline; on timeout, deliver and queue for reviewMost apps

Whatever you pick, run the check on your server, never only in the app, since anyone can call your API directly. Also decide what happens when the check is slow or down. Hosted providers retry on errors, so a bad moment can take seconds. Failing closed (hold the message) is safer; failing open (deliver and review) feels better. Choose per situation:

DEADLINE = 1.5  # seconds, your own budget

def handle_send(msg, sender, recipient):
    if not may_contact(sender, recipient):   # blocks, bans, rate limits
        return reject(msg)
    try:
        decision = classify(msg.text, timeout=DEADLINE)   # allow | flag | block
    except TimeoutError:
        decision = "flag" if sender.is_established else "hold"
    if decision == "block":
        return reject(msg)
    deliver(msg, held=(decision == "hold"))
    if decision != "allow":
        enqueue_for_review(msg)

Give every message a stable id before you check it, so retries, reports and removals refer to the same item. Re-check edits too, or users will send something clean and edit it afterwards.

Filtering versus flagging

Use block for what you never want delivered and flag for what depends on context. In chat, context decides a lot: "I'll kill you" is a threat in a dating app and trash talk in a game lobby. A workable starting split:

  • Block (do not deliver): threats, hate, sexual content where it does not belong, and requests for personal details aimed at minors.
  • Flag (deliver or hold, and queue): borderline harassment, violence that might be fiction or banter, self-harm language. For self-harm, a human reply or a link to help resources beats silence.
  • Allow: everything else, but log it, because reports will point back to it.

Tell the sender when a message was blocked. Silently dropping messages confuses honest users.

A classifier scores one message at a time, but harassment is a pattern. Count flags and blocks per sender over a window (say, three flagged messages in an hour) and escalate the account: a warning, a short mute, then human review. Images need checks too. Some providers score certain categories for text only, so confirm what is covered for images, and consider hash matching against known child sexual abuse material if you accept uploads.

Rate limits are moderation

A moderation API's rate limit protects the API, not your users. You need per-user limits of your own, enforced on the server, because spam, floods and mass cold messaging are mostly about volume. Starting points to tune (our suggestions, not a standard):

LimitExample for new accountsWhy
Messages per minute20, small burst allowedStops floods and scripts
New conversations per day10 to 20Stops mass cold messaging; raise as the account ages
Identical messages3 per hourCatches copy-paste spam
Messages to someone who has not repliedA few, then waitSlows harassment

Return a clear error with a retry time, so the app can say "slow down" instead of failing mysteriously.

Blocking that actually blocks

Blocking is the control users reach for first. Enforce it where messages are delivered, not just in the UI:

  • Store blocks on the server and check them at send time. A client that merely hides messages still lets the blocked user message and trigger notifications.
  • Block in both directions: the blocked user cannot start a conversation or add the blocker to a group.
  • Do not notify the blocked user. A "you were blocked" alert invites retaliation.
  • Watch for evasion: a new account contacting the same person right after a block is a strong abuse signal.

Blocks protect one person; bans protect everyone, and a banned user's messages should be refused before any other work. If you would rather not build the storage, TrustShip has block and ban endpoints (/v1/blocks and /v1/users/{id}/ban). Call them from your backend, not the app, because a project key shipped in an app binary can be extracted.

Private chats versus group chats

Direct messages

Reports are your main signal here, so make them rich: attach the reported message plus a few before and after, so the reviewer sees context, and say so in your privacy policy. With end-to-end encryption you cannot scan on the server at all, so you depend on reports (the reporter's device forwards the plaintext), blocks, rate limits and account signals. Whether and how you may scan private messages differs by country, so check with a lawyer.

Groups and channels

Groups add roles and reach. Give admins tools to remove members, delete messages and turn on slow mode, but let any member report to you directly, since admins are sometimes the problem. Cap group sizes, require approval for invite-link joins in large groups, and treat discoverable groups like public content, with stricter filtering.

Harassment signals

Individually fine messages can add up to harassment. Signals you can compute from data you already have:

  • Many messages to one person who never replies.
  • Several reports against the same sender, especially from different people.
  • A high share of a user's messages flagged or blocked.
  • New accounts that appear right after a block or ban and contact the same targets.

Use these to add friction (a mute, a cooldown, a review) rather than to ban automatically. A human should make the final call on anything that could end an account.

Grooming signals, at a high level

If minors can use your app, the strongest protection is structural: no cold messages from adults to minors, private profiles by default, no location sharing. Age is hard to verify, so treat any age signal as unreliable. Patterns that deserve human review (not automatic punishment, since many are also innocent):

  • An adult account contacting many much younger accounts.
  • Questions about age, location, school, or whether parents are around.
  • Requests to keep the conversation secret or to move to another app.
  • Gifts, money, or special attention that escalates quickly.
  • Conversations that shift fast from friendly to personal or sexual.

Route these to a reviewer, restrict the account while you look, and write the escalation steps down in advance. If you come across child sexual abuse material, do not open, copy or forward it: take it offline, restrict access and follow your local reporting rules. In the United States, covered providers report to NCMEC's CyberTipline; other countries have their own authorities. This is not legal advice, so check with a lawyer about what applies where you operate. Google Play's Child Safety Standards policy also covers social, dating and random chat apps, and asks for published standards, in-app feedback and a named child safety contact.

User controls

Automation will miss things, so give users control of their own inbox:

  • Report a message from the message itself (long-press), with reasons and an optional note, and confirm it was received.
  • Block and report together as one action.
  • Mute or leave a conversation or group quietly.
  • Who can message me: everyone, contacts only or nobody, with a "message requests" inbox for strangers.
  • Blur images from people they have not accepted yet.
  • A visible support contact in settings, which Apple's Guideline 1.2 requires.

Launch checklist

  1. A short policy that says what is not allowed, and users accept it before their first message.
  2. Server-side checks on text (and images, if accepted) with allow, flag and block outcomes.
  3. A decided behavior for slow or failed checks.
  4. Per-user rate limits, stricter for new accounts.
  5. Server-enforced blocking in both directions, and the ability to ban.
  6. A report button on every message, a queue, and a named person who reads it.
  7. Response targets you can keep, such as same day for threats.
  8. Safer defaults for minors, and an escalation page for child safety.
  9. A support email or link in the app and the store listing.
  10. A dry run: harass yourself from a second account, report, block, appeal, and check each step works.

Store policies and laws change and differ by country. Verify the current Apple and Google texts before you submit.

Ship the safety layer, not a side project

TrustShip gives your chat backend moderation checks, user reports, blocks and bans, a review queue and a Guideline 1.2 checklist behind one API. Start on the free plan and keep your time for the app.

Start free