diff --git a/src/modules/atproto/application/useCases/ProcessFollowFirehoseEventUseCase.ts b/src/modules/atproto/application/useCases/ProcessFollowFirehoseEventUseCase.ts --- a/src/modules/atproto/application/useCases/ProcessFollowFirehoseEventUseCase.ts +++ b/src/modules/atproto/application/useCases/ProcessFollowFirehoseEventUseCase.ts @@ -156,7 +156,7 @@ return ok(undefined); } - targetId = collectionIdResult.value.toString(); + targetId = collectionIdResult.value.getStringValue(); } else { if (ENABLE_FIREHOSE_LOGGING) { console.warn( diff --git a/src/modules/atproto/infrastructure/services/DrizzleFirehoseEventDuplicationService.ts b/src/modules/atproto/infrastructure/services/DrizzleFirehoseEventDuplicationService.ts --- a/src/modules/atproto/infrastructure/services/DrizzleFirehoseEventDuplicationService.ts +++ b/src/modules/atproto/infrastructure/services/DrizzleFirehoseEventDuplicationService.ts @@ -101,6 +101,14 @@ // If a record exists, it hasn't been deleted return ok(records.length === 0); } + case collections.follow: { + const followInfoResult = + await this.atUriResolver.resolveFollowId(atUri); + if (followInfoResult.isErr()) { + return err(followInfoResult.error); + } + return ok(followInfoResult.value === null); + } default: return err(new Error(`Unknown collection type: ${collection}`)); }