Mirror — see github.com/blacksky-algorithms/blacksky.community
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Blacksky labeler non-removable like Bluesky Moderation

- Filter BLACKSKY_LABELER from custom labeler headers (auto-included via appLabelers)
- Prevent unsubscribing from any app labeler in the subscription mutation

+11 -2
+4
src/state/queries/labeler.ts
··· 3 3 import {z} from 'zod' 4 4 5 5 import {MAX_LABELERS} from '#/lib/constants' 6 + import {isAppLabeler} from '#/lib/moderation' 6 7 import { 7 8 PERSISTED_QUERY_GCTIME, 8 9 PERSISTED_QUERY_ROOT, ··· 136 137 } 137 138 await agent.addLabeler(did) 138 139 } else { 140 + if (isAppLabeler(did)) { 141 + return 142 + } 139 143 await agent.removeLabeler(did) 140 144 } 141 145 },
+7 -2
src/state/session/moderation.ts
··· 3 3 4 4 import {IS_TEST_USER} from '#/lib/constants' 5 5 import {getNoAppLabelers} from '../preferences/no-app-labelers' 6 - import {configureAdditionalModerationAuthorities} from './additional-moderation-authorities' 6 + import { 7 + BLACKSKY_LABELER, 8 + configureAdditionalModerationAuthorities, 9 + } from './additional-moderation-authorities' 7 10 import {readLabelers} from './agent-config' 8 11 import {type SessionAccount} from './types' 9 12 ··· 29 32 const labelerDids = await readLabelers(account.did).catch(_ => {}) 30 33 if (labelerDids) { 31 34 agent.configureLabelersHeader( 32 - labelerDids.filter(did => did !== BSKY_LABELER_DID), 35 + labelerDids.filter( 36 + did => did !== BSKY_LABELER_DID && did !== BLACKSKY_LABELER, 37 + ), 33 38 ) 34 39 } else { 35 40 // If there are no headers in the storage, we'll not send them on the initial requests.