Navigation

Moderator Notes

Free-text notes a moderator can attach to a room member, visible only to holders of a moderation permission — context for future moderation decisions ("warned twice for spam in June"). Notes are append-only, so the record stays trustworthy — a correction is a new note, never an edit.

How it works

Notes are moderation-log-shaped (append-heavy, time-ordered, per-room, no joins), so they live in Azure Table alongside the audit log rather than in Postgres. Each note is partitioned by roomId with a reverse-ticked rowKey so the newest note sorts first, and carries the target member, the authoring moderator, and the note text. A member's actions — their profile's overflow menu and their row's context menu, one list built by useMemberActionItems — carry a Notes item, titled with how many notes exist once the profile has read the count, and the dialog lists them newest-first with an input to append another.

flowchart LR
  N["a member's Notes dialog"] -->|createModerationNote| W["AzureTable.ModerationNotes append"]
  N -->|readModerationNotes| R["cursor-paginated per-member read"]
  W --> R

Room deletion cleans the partition the same way messages are cleaned.

Data model

Azure Table AzureTable.ModerationNotes: partitionKey = roomId, rowKey = reverseTickedTimestamp, fields targetUserId, actorUserId, and note (bounded by a max-length constant). There is no edit or delete.

Procedures

All under message.moderation. (server/trpc/routers/message/moderation.ts), gated on KickMembers — the lowest "acts on members" moderation bit, consistent with warn and timeout being visible to the same audience:

ProcedurePurpose
createModerationNote({ roomId, targetUserId, note })append a note
readModerationNotes({ roomId, targetUserId, cursor })cursor-paginated per-member view
readModerationNotesCount({ roomId, targetUserId })note count for the menu item

Key files

FileRole
packages/db-schema/src/models/message/ModerationNoteEntity.tsnote entity
apps/web/server/trpc/routers/message/moderation.tsthe three procedures
apps/web/app/store/message/moderation/note.tsclient note list store
apps/web/app/components/Message/Model/Member/ActionDialog/Notes.vuethe notes dialog
apps/web/app/composables/message/user/useMemberActionItems.tsthe Notes item among a member's actions

Details

Command palette

Keyboard shortcuts