Skip to content

Commit

Permalink
changed to an includedrecord whitelist (only care about posts)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bossett committed Sep 4, 2024
1 parent af5be33 commit d6ca8a9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/util/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ import {
} from '../lexicon/types/com/atproto/sync/subscribeRepos'
import { Database } from '../db'

const ignoredRecords = new Set([
'app.bsky.feed.repost',
'app.bsky.graph.follow',
'app.bsky.feed.like',
])
const includedRecords = new Set(['app.bsky.feed.post'])

export abstract class FirehoseSubscriptionBase {
public sub: Subscription<RepoEvent>
Expand Down Expand Up @@ -87,7 +83,7 @@ export const getOpsByType = async (evt: Commit): Promise<OperationsByType> => {
const uri = `at://${evt.repo}/${op.path}`
const [collection] = op.path.split('/')

if (ignoredRecords.has(collection)) continue
if (!includedRecords.has(collection)) continue

if (op.action === 'update') continue // updates not supported yet

Expand Down

0 comments on commit d6ca8a9

Please sign in to comment.