PDS Admin tool make it easier to moderate your PDS with labels
43
fork

Configure Feed

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

some loggign and ofc i didnt forget to ignore the .env

+6 -10
-5
.env
··· 1 - DATABASE_URL=file:./label-watcher.db 2 - MIGRATIONS_FOLDER=drizzle 3 - NOTIFY_SMTP_URL=smtp://localhost:1025 4 - NOTIFY_SENDER_EMAIL=yougotmail@pdsmoover.com 5 - LOG_LEVEL=debug
+1
.gitignore
··· 2 2 dist 3 3 label-watcher.db 4 4 settings.toml 5 + .env
+4 -4
src/handlers/handleNewLabel.ts
··· 51 51 throw new Error(`Watched repo: ${watchedRepo.did} config not found`); 52 52 } 53 53 54 - logger.info( 54 + logger.debug( 55 55 { action: labelConfig.action }, 56 - `Listed label: ${label.val} found. Performing the action against: ${label.uri}`, 56 + `Listed label: ${label.val} found added to ${watchedRepo.did}`, 57 57 ); 58 58 59 59 const existing = await db ··· 95 95 96 96 // Perform action 97 97 if (labelConfig.action === "notify") { 98 - console.log(pdsConfig.notifyEmails); 98 + //TODO need to prob move this to a queue cause backfill can hit rate limit 99 99 await sendLabelNotification(pdsConfig.notifyEmails, { 100 - did: label.uri, 100 + did: label.uri,¡¡ 101 101 pds: pdsConfig.host, 102 102 label: label.val, 103 103 labeler: config.host,
+1 -1
src/handlers/pdsSubscriber.ts
··· 31 31 } 32 32 switch (message.$type) { 33 33 case "com.atproto.sync.subscribeRepos#account": { 34 - logger.info( 34 + logger.debug( 35 35 { 36 36 host: config.host, 37 37 did: message.did,