moderation library

Classes

InterpretedLabelValueDefinition
ModerationBehaviors
A configuration object that determines how moderation causes are interpreted and translated into UI behaviors.
ModerationCause
ModerationCauseBlockedBy
ModerationCauseBlocking
ModerationCauseBlockOther
ModerationCauseHidden
ModerationCauseLabel
ModerationCauseMuted
ModerationCauseMuteWord
ModerationCauseSource
ModerationCauseSourceLabeler
ModerationCauseSourceList
ModerationCauseSourceUser
ModerationDecision
ModerationOpts
ModerationPrefs
ModerationPrefsLabeler
ModerationSubjectExternalView
An app.bsky.embed.external view to moderate: a plain external link or one of the richer modality views (article, publication, gallery, livestream).
ModerationSubjectFeedGenerator
ModerationSubjectNotification
ModerationSubjectPost
ModerationSubjectProfile
An app.bsky.actor.defs#profileLinkView to moderate: a link shown on a profile, backed by an app.bsky.actor.link record.
ModerationSubjectUserList
ModerationUI
MuteWordMatch
A match found by matchMuteWords.

Enums

KnownLabelValue
The label values com.atproto.label.defs#labelValue declares as known.
LabelPreference
LabelTarget
LabelValueDefinitionFlag
ModerationBehavior
ModerationBehaviorContext

Extensions

InterpretedLabelValueDefinitionPatterns on InterpretedLabelValueDefinition
Adds pattern-matching-related methods to InterpretedLabelValueDefinition.
LabelerServiceExtension on LabelerService
ModerationCauseBlockedByPatterns on ModerationCauseBlockedBy
Adds pattern-matching-related methods to ModerationCauseBlockedBy.
ModerationCauseBlockingPatterns on ModerationCauseBlocking
Adds pattern-matching-related methods to ModerationCauseBlocking.
ModerationCauseBlockOtherPatterns on ModerationCauseBlockOther
Adds pattern-matching-related methods to ModerationCauseBlockOther.
ModerationCauseHiddenPatterns on ModerationCauseHidden
Adds pattern-matching-related methods to ModerationCauseHidden.
ModerationCauseLabelPatterns on ModerationCauseLabel
Adds pattern-matching-related methods to ModerationCauseLabel.
ModerationCauseMutedPatterns on ModerationCauseMuted
Adds pattern-matching-related methods to ModerationCauseMuted.
ModerationCauseMuteWordPatterns on ModerationCauseMuteWord
Adds pattern-matching-related methods to ModerationCauseMuteWord.
ModerationCausePatterns on ModerationCause
Adds pattern-matching-related methods to ModerationCause.
ModerationCauseSourceLabelerPatterns on ModerationCauseSourceLabeler
Adds pattern-matching-related methods to ModerationCauseSourceLabeler.
ModerationCauseSourceListPatterns on ModerationCauseSourceList
Adds pattern-matching-related methods to ModerationCauseSourceList.
ModerationCauseSourcePatterns on ModerationCauseSource
Adds pattern-matching-related methods to ModerationCauseSource.
ModerationCauseSourceUserPatterns on ModerationCauseSourceUser
Adds pattern-matching-related methods to ModerationCauseSourceUser.
ModerationOptsPatterns on ModerationOpts
Adds pattern-matching-related methods to ModerationOpts.
ModerationPrefsLabelerPatterns on ModerationPrefsLabeler
Adds pattern-matching-related methods to ModerationPrefsLabeler.
ModerationPrefsPatterns on ModerationPrefs
Adds pattern-matching-related methods to ModerationPrefs.
ModerationSubjectExternalViewPatterns on ModerationSubjectExternalView
Adds pattern-matching-related methods to ModerationSubjectExternalView.
ModerationSubjectFeedGeneratorPatterns on ModerationSubjectFeedGenerator
Adds pattern-matching-related methods to ModerationSubjectFeedGenerator.
ModerationSubjectNotificationPatterns on ModerationSubjectNotification
Adds pattern-matching-related methods to ModerationSubjectNotification.
ModerationSubjectPostPatterns on ModerationSubjectPost
Adds pattern-matching-related methods to ModerationSubjectPost.
ModerationSubjectProfileLinkPatterns on ModerationSubjectProfileLink
Adds pattern-matching-related methods to ModerationSubjectProfileLink.
ModerationSubjectProfilePatterns on ModerationSubjectProfile
Adds pattern-matching-related methods to ModerationSubjectProfile.
ModerationSubjectUserListPatterns on ModerationSubjectUserList
Adds pattern-matching-related methods to ModerationSubjectUserList.
ModerationUIExtension on ModerationUI
ModerationUIPatterns on ModerationUI
Adds pattern-matching-related methods to ModerationUI.
PreferencesExtension on ActorGetPreferencesOutput

Constants

kBlockBehavior → const Map<String, ModerationBehavior>
kDefaultBlockBehaviors → const Map<ModerationBehaviorContext, ModerationBehavior>
The default behaviors applied when the subject is blocked.
kDefaultHideBehaviors → const Map<ModerationBehaviorContext, ModerationBehavior>
The default behaviors applied when the subject is hidden by the user.
kDefaultLabelSettings → const Map<KnownLabelValue, LabelPreference>
kDefaultMuteBehaviors → const Map<ModerationBehaviorContext, ModerationBehavior>
The default behaviors applied when the subject is muted.
kDefaultMuteWordBehaviors → const Map<ModerationBehaviorContext, ModerationBehavior>
The default behaviors applied when the subject matches a muted word.
kGoreInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
Deprecated alias for kGraphicMediaInterpretedLabelValueDefinition.
kGraphicMediaInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
kHideBehavior → const Map<String, ModerationBehavior>
kHideInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
kLabelDefinitions → const Map<String, InterpretedLabelValueDefinition>
The known label definitions keyed by label identifier.
kLabels → const Map<KnownLabelValue, InterpretedLabelValueDefinition>
kMuteBehavior → const Map<String, ModerationBehavior>
kMuteWordBehavior → const Map<String, ModerationBehavior>
kNoopBehavior → const Map
kNoUnauthenticatedInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
kNudityInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
kPornInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
kSexualInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition
kWarnInterpretedLabelValueDefinition → const InterpretedLabelValueDefinition

Functions

getInterpretedLabelValueDefinition({required String identifier, LabelPreference defaultSetting = LabelPreference.warn, required String severity, required String blurs, String? definedBy, bool adultOnly = false}) → InterpretedLabelValueDefinition
getInterpretedLabelValueDefinitions(LabelerViewDetailed labelerView) → List<InterpretedLabelValueDefinition>
getLabelerHeaders(ModerationPrefs? prefs, {List<String> appLabelers = const [_kBskyLabelerDid]}) → Map<String, String>
hasMutedWord({required List<MutedWord> mutedWords, required String text, List<RichtextFacet>? facets, List<String>? outlineTags, List<String>? languages, ProfileViewBasic? actor}) → bool
Checks if the given text matches any of the muted words, returning a boolean if any matches are found.
matchMuteWords({required List<MutedWord> mutedWords, required String text, List<RichtextFacet>? facets, List<String>? outlineTags, List<String>? languages, ProfileViewBasic? actor}) → List<MuteWordMatch>
Checks if the given text matches any of the muted words, returning the list of matches. An empty list means no matches were found.
mergeModUIResults(List<ModerationUI?> uis) → ModerationUI
Merges several ModerationUI results into one, for a UI element that is subject to more than one moderation decision or context.
moderateExternalView(ModerationSubjectExternalView subject, ModerationOpts opts) → ModerationDecision
Moderates an app.bsky.embed.external view: a plain external link or one of the article, publication, gallery and livestream views.
moderateFeedGenerator(ModerationSubjectFeedGenerator subject, ModerationOpts opts) → ModerationDecision
moderateNotification(ModerationSubjectNotification subject, ModerationOpts opts) → ModerationDecision
moderatePost(ModerationSubjectPost subject, ModerationOpts opts) → ModerationDecision
moderateProfile(ModerationSubjectProfile subject, ModerationOpts opts) → ModerationDecision
Moderates an app.bsky.actor.defs#profileLinkView.
moderateStatus(ModerationSubjectProfile subject, ModerationOpts opts) → ModerationDecision
moderateUserList(ModerationSubjectUserList subject, ModerationOpts opts) → ModerationDecision
moderateViewExternal(EmbedExternalViewExternal subject, ModerationOpts opts) → ModerationDecision
Moderates an app.bsky.embed.external#viewExternal.