Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫
Something went wrong. Try again.
554 B · 22 lines
TypeScript
at prod
1234567891011121314151617181920212223import {AppBskyFeedDefs} from '@atproto/api'
export const CONTENT_LABELS = ['porn', 'sexual', 'nudity', 'graphic-media']
export function labelsToInfo( labels?: AppBskyFeedDefs.PostView['labels'],): string | undefined { const label = labels?.find(label => CONTENT_LABELS.includes(label.val))
switch (label?.val) { case 'porn': case 'sexual': return 'Adult Content' case 'nudity': return 'Non-sexual Nudity' case 'gore': case 'graphic-media': return 'Graphic Media' default: return undefined }}