about summary refs log tree commit diff
path: root/src/lib/moderation.ts
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-10-16 19:17:22 -0700
committerGitHub <noreply@github.com>2024-10-16 19:17:22 -0700
commit2e74f9839246c7dee718ac8bc12c22395ff002b5 (patch)
treec308f1d5e0fe13f2b43b3df08958465507153e15 /src/lib/moderation.ts
parent3d9663db1e3a32ac5daeba5cddbcb86b8eaab971 (diff)
downloadvoidsky-2e74f9839246c7dee718ac8bc12c22395ff002b5.tar.zst
Add graphic media self label (#5758)
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Diffstat (limited to 'src/lib/moderation.ts')
-rw-r--r--src/lib/moderation.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/moderation.ts b/src/lib/moderation.ts
index 7576a9c33..be503f4c7 100644
--- a/src/lib/moderation.ts
+++ b/src/lib/moderation.ts
@@ -14,6 +14,14 @@ import {sanitizeDisplayName} from '#/lib/strings/display-names'
 import {sanitizeHandle} from '#/lib/strings/handles'
 import {AppModerationCause} from '#/components/Pills'
 
+export const ADULT_CONTENT_LABELS = ['sexual', 'nudity', 'porn']
+export const OTHER_SELF_LABELS = ['graphic-media']
+export const SELF_LABELS = [...ADULT_CONTENT_LABELS, ...OTHER_SELF_LABELS]
+
+export type AdultSelfLabel = (typeof ADULT_CONTENT_LABELS)[number]
+export type OtherSelfLabel = (typeof OTHER_SELF_LABELS)[number]
+export type SelfLabel = (typeof SELF_LABELS)[number]
+
 export function getModerationCauseKey(
   cause: ModerationCause | AppModerationCause,
 ): string {