Filter out imperative labels from typeaheads

This commit is contained in:
Eric Bailey
2024-09-06 12:38:04 -05:00
parent 52ae6b603f
commit f8772fc59a
2 changed files with 14 additions and 2 deletions
+8
View File
@@ -33,6 +33,14 @@ export function isJustAMute(modui: ModerationUI): boolean {
return modui.filters.length === 1 && modui.filters[0].type === 'muted'
}
export function isImperative(modui: ModerationUI): boolean {
const label = modui.filters.at(0)
if (label && label.type === 'label') {
return ['!hide', '!takedown'].includes(label.label.val)
}
return false
}
export function getLabelingServiceTitle({
displayName,
handle,