hasMutedWord function

bool hasMutedWord({
  1. required List<MutedWord> mutedWords,
  2. required String text,
  3. List<RichtextFacet>? facets,
  4. List<String>? outlineTags,
  5. List<String>? languages,
  6. ProfileViewBasic? actor,
})

Checks if the given text matches any of the muted words, returning a boolean if any matches are found.

Implementation

bool hasMutedWord({
  required List<MutedWord> mutedWords,
  required String text,
  List<RichtextFacet>? facets,
  List<String>? outlineTags,
  List<String>? languages,
  ProfileViewBasic? actor,
}) => matchMuteWords(
  mutedWords: mutedWords,
  text: text,
  facets: facets,
  outlineTags: outlineTags,
  languages: languages,
  actor: actor,
).isNotEmpty;