Moderating voice chat
This guide wires up a moderation loop: a plugin flags toxic messages, your code reacts to the flag, and you record a sanction your game server enforces on the next join.
1. Activate a moderation plugin
Browse the catalog and activate a toxicity/hate-speech plugin for your project. It will run on every transcribed message and attach annotations to the ones it flags.
2. React to flagged messages
You can react either in real time over SSE or, for durable handling, in a serverless function. Here’s the function approach — it runs on every annotation:
externalUserIdUsing externalUserId (rather than a single participant id) means a returning player is
still muted/banned on their next join, even in a different session. See
Users & Participants.
3. Enforce on the next join
Cortex records sanctions; your systems enforce them. On every room join, ask Cortex whether the user has active sanctions and act accordingly:
You can also drive enforcement from the sanction.created
event via a webhook.
4. Appeals & audit
Lifting a sanction keeps the full history — nothing is deleted:
createdBy, createdAt, revokedBy and revokedAt are all retained for accountability.