Skip to content

Comments module

Users can comment on channel posts — text, one image, and animated emoji, with nested replies. Comments are not Intercom chat messages: they are stored only in PostgreSQL on your AW Chat backend. See Data model.

Strict content rules (no links, DLP), per-post / global / night-mode toggles, and back-office moderation apply. This page covers what the host app must provide and how the pieces fit together.

User identity & avatar (what you pass at init)

The SDK already knows userId (from sessionToken). For comments it also needs a display name and avatar from the host — the SDK does not fetch a profile:

tsx
<AWChat
  userId={user.id}
  sessionToken={token}
  serverUrl="https://chat.example.com"
  telemetry={telemetry}
  userDisplayName={user.name}
  userAvatarUrl={user.avatarUrl}
/>
  • Missing userDisplayName → initials.
  • Missing userAvatarUrl → initials avatar.
  • Display-only: snapshotted on the server with each comment; later profile changes do not rewrite history.

Verified is server-authoritative

The Verified badge is not client-controlled. Only server-marked official authors get it. Display names that imitate staff (admin / support / official, etc.) are rejected at the API.

Storage reminder

Support chatChannel comments
StoreIntercomPostgres channel_comments (+ attachments)
API prefix/api/conversations/api/channel/.../comments
ModerationIntercom inboxAdmin panel + optional in-feed mods

Content rules (server-side)

  • No links (http(s)://, t.me/, bare domains) → rejected.
  • Images only (one per comment; jpg/png/webp, etc.).
  • DLP — seed phrase, private key, card (Luhn), labelled password blocked; moderation events store a redacted snippet only.
  • Rate limit ~1 comment / 8s / user.
  • Security banner pinned in every thread.

Toggles

ControlWhereEffect
Per-postAdmin post editor → Comments enabledHides comment entry on that post
GlobalAdmin → channel settingsLocks commenting channel-wide
Night modeChannel quiet hoursComposer disabled in the window

Moderation

  • Admin permission moderate_comments: queue (all / reported / filtered / hidden / deleted), hide/restore/delete, mute/ban.
  • In-feed moderators (assigned per channel) can act from the SDK when the API marks viewerIsModerator.
  • End users can Report a comment.

Client UX

  • Comments bar under each post; full-screen thread with post + security banner.
  • Optimistic send; failures marked not sent (no chat-style retry button today).
  • Threaded replies under parents.
  • Web and React Native.

Endpoints

See API reference — Comments.

AW Chat SDK — integration & platform handoff docs.