A Bluesky labeler that labels accounts hosted on PDSes operated by entities other than Bluesky PBC
3
fork

Configure Feed

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

Blocking atproto.brid.gy is back on the menu - it's just too big and too slow to respond

gbl08ma 422db931 0ad0fcd1

+9 -4
+9 -4
labelDefiner.ts
··· 3 3 import { PDSCrawler } from "./pdsCrawler"; 4 4 import type { KnownPDS } from "./knownPDSStorage"; 5 5 6 - //const labelDefinitions = await getLabelerLabelDefinitions(credentials) ?? []; 7 - 8 6 type simplifiedLabel = { 9 7 identifier: string, 10 8 name: string, ··· 25 23 description: "Account is hosted by a smaller independent PDS", 26 24 offByDefault: false, 27 25 }; 26 + 27 + const ignoredPDSHostnamePatterns: RegExp[] = [ 28 + /^.+\.bsky\.network$/, // These are operated by Bluesky PBC 29 + /^atproto\.brid\.gy$/ // It's too slow to respond 30 + ]; 28 31 29 32 export class LabelDefiner { 30 33 private loginCredentials: LoginCredentials; ··· 123 126 const pdsURL = new URL(pds); 124 127 const possibleLabel = pdsURL.hostname.replaceAll("-", "--").split(".").reverse().join("-"); 125 128 126 - if (pdsURL.hostname.endsWith(".bsky.network")) { 127 - return []; 129 + for(const r of ignoredPDSHostnamePatterns) { 130 + if(r.test(pdsURL.hostname)) { 131 + return []; 132 + } 128 133 } 129 134 130 135 return [baseLabel, this.dedicatedLabelsMap.get(possibleLabel) ?? fallbackLabel];