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
+4
View File
@@ -1,6 +1,7 @@
import {BSKY_LABELER_DID, BskyAgent} from '@atproto/api'
import {IS_TEST_USER} from '#/lib/constants'
import {configureAdditionalModerationAuthorities} from './additional-moderation-authorities'
import {readLabelers} from './agent-config'
import {SessionAccount} from './types'
@@ -8,6 +9,7 @@ export function configureModerationForGuest() {
// This global mutation is *only* OK because this code is only relevant for testing.
// Don't add any other global behavior here!
switchToBskyAppLabeler()
configureAdditionalModerationAuthorities()
}
export async function configureModerationForAccount(
@@ -31,6 +33,8 @@ export async function configureModerationForAccount(
// If there are no headers in the storage, we'll not send them on the initial requests.
// If we wanted to fix this, we could block on the preferences query here.
}
configureAdditionalModerationAuthorities()
}
function switchToBskyAppLabeler() {