Additional moderation (#5172)

* Set up additional mod authorities

* Filter out non-configurable mod authorities

* WIP

* Working

* Cleanup, add mod

* Cleanup

* Add more debug logs

* Tweak logs

* Filter out imperative labels from typeaheads

* Filter hideable content from notifications

* Add api

* Fall back in dev

* Remove space

* Use prod endpoint

* Add tiny notice

* Add notice to labeler card, show all labelers
This commit is contained in:
Eric Bailey
2024-09-20 14:16:23 -05:00
committed by GitHub
parent 395edfe78f
commit c85a271ef6
12 changed files with 365 additions and 65 deletions
+5
View File
@@ -13,6 +13,7 @@ import {
import {QueryClient} from '@tanstack/react-query'
import chunk from 'lodash.chunk'
import {labelIsHideableOffense} from '#/lib/moderation'
import {precacheProfile} from '../profile'
import {FeedNotification, FeedPage, NotificationType} from './types'
@@ -104,6 +105,10 @@ export function shouldFilterNotif(
notif: AppBskyNotificationListNotifications.Notification,
moderationOpts: ModerationOpts | undefined,
): boolean {
const containsImperative = !!notif.author.labels?.some(labelIsHideableOffense)
if (containsImperative) {
return true
}
if (!moderationOpts) {
return false
}