···48 }
49 case "com.atproto.label.subscribeLabels#labels": {
50 for (const label of message.labels) {
51+ // We only care about labels for identities, not content for now
52+ if (label.uri.startsWith("did:")) {
53+ queue.add(async () => {
54+ await handleNewLabel(config, label, db);
55+ });
56+ }
57 }
58 break;
59 }
+17-7
src/index.ts
···45const lastCursors = await db.select().from(labelerCursor);
4647// Sets up the subscribers to the labelers
48-const labelSubscribers = Object.entries(settings.labeler).map(([_, config]) => {
49- let lastCursorRow = lastCursors.find(
50- (cursor) => cursor.labelerId === config.host,
51- );
52- let lastCursor = lastCursorRow?.cursor ?? undefined;
53- return labelerSubscriber(config, lastCursor, db, labelQueue);
54-});
00000000005556const pdsSubscribers = Object.entries(settings.pds)
57 .map(([_, config]) => {
···45const lastCursors = await db.select().from(labelerCursor);
4647// Sets up the subscribers to the labelers
48+const labelSubscribers = Object.entries(settings.labeler)
49+ .map(([_, config]) => {
50+ if (config.labels == undefined) {
51+ logger.info(
52+ { host: config.host },
53+ "No labels to watch not starting subscriber for this one",
54+ );
55+ return null;
56+ }
57+58+ let lastCursorRow = lastCursors.find(
59+ (cursor) => cursor.labelerId === config.host,
60+ );
61+ let lastCursor = lastCursorRow?.cursor ?? undefined;
62+ return labelerSubscriber(config, lastCursor, db, labelQueue);
63+ })
64+ .filter((x) => x !== null);
6566const pdsSubscribers = Object.entries(settings.pds)
67 .map(([_, config]) => {
+3-1
src/logger.ts
···1import pino from "pino";
23-export const logger = pino();
00