---
source_url: https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/moderation
title: Moderate users and messages
updated_at: 2026-09-30T07:20:08.000Z
---

# Moderate users and messages

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

:::tip Related moderation approaches
Chat SDK provides programmatic muting and flagging. See also: [Auto Moderation](https://www.pubnub.com/docs/message-processing/moderation/configure-auto-moderation.md) (AI-powered), [Channel Monitor](https://www.pubnub.com/docs/message-processing/moderation/overview.md) (manual review), [Moderation Overview](https://www.pubnub.com/docs/message-processing/moderation/overview.md).
:::

Chat SDK offers multiple approaches for moderating users and messages.

## Flag messages

Users can [flag a message](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/moderation.md) to report offensive content. A reason is required.

## Mute users

Users can [mute others](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/users/moderation-user.md) on their client to hide incoming and historical messages (other users still see them).

The mute list holds up to 200 users and persists only for the session by default. [Enable persistence](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/configuration.md#sync-muted-users) to save and retrieve the list across sessions.

:::warning Access Manager with client-side mute list
When using Access Manager with `syncMutedUsers` enabled, grant these permissions (replace `$currentUserId` with the user's ID):
* `read` on channel `PN_PRIV.$currentUserId.mute1`
* `update`, `delete`, `get` for user `PN_PRIV.$currentUserId.mute1`
:::

## Listen to flagging events

Monitor [reported message events](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/moderation.md#listen-to-report-events) as an admin.

### Handle flagging events

Add custom moderation logic or integrate with third-party services via [PubNub Integrations](https://www.pubnub.com/integrations/) (import from Admin Portal's Functions tab for profanity filtering and more).

## Prevent message spamming

Set client-side rate limits per channel type (direct, group, public) using `rateLimitPerChannel` and `rateLimitFactor` during initialization. See [Configuration](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/configuration.md) for details.

Last updated at: 2026-09-30T07:20:08.000Z
